@letterstory/cli 0.177.77 → 0.177.79
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 +6 -3
- package/lib/commands/build.mjs +2 -0
- package/lib/commands/repo.mjs +2 -0
- package/lib/commands/usage.mjs +35 -1
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
91
91
|
|
|
92
92
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
93
|
-
export const VERSION = "0.177.
|
|
93
|
+
export const VERSION = "0.177.79";
|
|
94
94
|
|
|
95
95
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
96
96
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -99,6 +99,7 @@ export const EXIT_PAYMENT_REQUIRED = 3;
|
|
|
99
99
|
// can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
|
|
100
100
|
// `negate` spelling) in a command's ARGS map must be listed; boolean-flags.test.ts enforces it.
|
|
101
101
|
export const BOOLEAN_FLAGS = new Set([
|
|
102
|
+
"clear-choice",
|
|
102
103
|
// models list: say whether each trained model's server is up now.
|
|
103
104
|
"serving",
|
|
104
105
|
// Models material: retain a request for attachments before preparing it.
|
|
@@ -184,6 +185,8 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
184
185
|
"build-it",
|
|
185
186
|
// build: every change reads Letter's tools from its sandbox.
|
|
186
187
|
"primitives-access",
|
|
188
|
+
// build, repo revise: the sandbox also writes in Letter (posts into the blog collection, its publish target).
|
|
189
|
+
"letter-writes",
|
|
187
190
|
// build list: only Build's Archived tab (--open, already listed, is its Open tab).
|
|
188
191
|
"archived",
|
|
189
192
|
// plan pending --queued: only the rows a person queued for later.
|
|
@@ -1895,7 +1898,7 @@ Build (a change to your site, or launching what isn't code; the Build box's own
|
|
|
1895
1898
|
build <words…> [--prompt <text>] [--site <host>] [--subject <host/path>]... [--action build|build_pr|build_merge|slack|linear]
|
|
1896
1899
|
[--attach <path>]... [--attach-url <name>=<https url>]... [--attach-ref <path>]... [--attach-url-ref <name>=<https url>]...
|
|
1897
1900
|
[--harness letterpress-1|claude-code|codex] [--effort low|medium|high|xhigh] [--notify-slack] [--again] [--new-site]
|
|
1898
|
-
[--primitives-access]
|
|
1901
|
+
[--primitives-access] [--letter-writes]
|
|
1899
1902
|
Build from your words: "add a pricing page" opens a preview or PR;
|
|
1900
1903
|
"launch a phantom for us", "set up mailers" or "onboard my blog" is
|
|
1901
1904
|
done by Build itself (a phantom site buys its own domain), and the
|
|
@@ -2025,7 +2028,7 @@ Repo changes (Claude Code edits your repo in a sandbox; the Letter GitHub App op
|
|
|
2025
2028
|
[--detail full] one row per run by default; full: every field
|
|
2026
2029
|
repo publish <run-id> Make PR on a preview in review
|
|
2027
2030
|
repo merge <run-id> Merge its open PR (a squash; the repo's branch rules decide)
|
|
2028
|
-
repo revise <run-id> --instructions <text>|--instructions-file <path|-> [--copy-edits-file <path|->]
|
|
2031
|
+
repo revise <run-id> --instructions <text>|--instructions-file <path|-> [--copy-edits-file <path|->] [--letter-writes]
|
|
2029
2032
|
[--attach <path>]… [--attach-ref <path>]… [--attach-url name=url]… [--attach-url-ref name=url]…
|
|
2030
2033
|
Ask for more on a preview (it takes over the preview's link) or an
|
|
2031
2034
|
open PR (one more commit); copy edits: JSON [{ path, before, after }];
|
package/lib/commands/build.mjs
CHANGED
|
@@ -69,6 +69,8 @@ const ARGS = {
|
|
|
69
69
|
notify_slack: { flag: "notify-slack", type: "bool" },
|
|
70
70
|
// --primitives-access: its change reads Letter's tools from its sandbox (a read-only MCP key beside the repo).
|
|
71
71
|
primitives_access: { flag: "primitives-access", type: "bool" },
|
|
72
|
+
// --letter-writes: part of the ask is done in Letter (posts into the blog collection, its publish target).
|
|
73
|
+
letter_writes: { flag: "letter-writes", type: "bool" },
|
|
72
74
|
harness: { flag: "harness", enum: ["letterpress-1", "claude-code", "codex"] },
|
|
73
75
|
// --branch <name>: where its changes start and its pull requests go; omitted, the branch that builds the site.
|
|
74
76
|
base_branch: "branch",
|
package/lib/commands/repo.mjs
CHANGED
|
@@ -295,6 +295,8 @@ const ARGS = {
|
|
|
295
295
|
run_id: { positional: 0, required: true, label: "run-id" },
|
|
296
296
|
instructions: { value: (flags) => readTextInput(flags, "instructions", "instructions-file") },
|
|
297
297
|
copy_edits: { value: (flags) => copyEdits(flags) },
|
|
298
|
+
// --letter-writes: the follow-up also writes in Letter (a review issue the last run had no access for).
|
|
299
|
+
letter_writes: { flag: "letter-writes", type: "bool" },
|
|
298
300
|
files: { value: (_flags, _positionals, extra) => (extra.files?.length ? extra.files : undefined) },
|
|
299
301
|
},
|
|
300
302
|
address_pr_review: { run_id: { positional: 0, required: true, label: "run-id" } },
|
package/lib/commands/usage.mjs
CHANGED
|
@@ -33,9 +33,24 @@ const repoPart = (i) => ({
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
export const ARGS = {
|
|
36
|
+
get_usage_sources: { host: { flag: "host" }, site_id: { flag: "site" } },
|
|
37
|
+
choose_product_repo: {
|
|
38
|
+
repo_owner: { flag: "owner" },
|
|
39
|
+
repo_name: { flag: "repo" },
|
|
40
|
+
reset: { flag: "clear-choice", type: "bool" },
|
|
41
|
+
},
|
|
42
|
+
connect_proof_database: {
|
|
43
|
+
project_ref: { flag: "project" },
|
|
44
|
+
host: { flag: "host" },
|
|
45
|
+
access_token: { flag: "key" },
|
|
46
|
+
streams: { value: (flags) => JSON.parse(readFileSync(String(flags.streams), "utf8")) },
|
|
47
|
+
},
|
|
48
|
+
get_proof_database: {},
|
|
49
|
+
disconnect_proof_database: {},
|
|
36
50
|
generate_proof_actions: {
|
|
37
51
|
window: { value: (flags) => ({ since: flags.since, until: flags.until }) },
|
|
38
52
|
focus: { flag: "focus" },
|
|
53
|
+
source: { flag: "source" },
|
|
39
54
|
},
|
|
40
55
|
refresh_proof_actions: {},
|
|
41
56
|
get_proof_actions: { id: { flag: "id" } },
|
|
@@ -53,8 +68,12 @@ export const ARGS = {
|
|
|
53
68
|
base_branch: { flag: "base" },
|
|
54
69
|
mode: { flag: "mode" },
|
|
55
70
|
},
|
|
56
|
-
discover_action_events: {
|
|
71
|
+
discover_action_events: {
|
|
72
|
+
source: { flag: "source" },
|
|
73
|
+
window: { value: (flags) => ({ since: flags.since, until: flags.until }) },
|
|
74
|
+
},
|
|
57
75
|
evaluate_action: {
|
|
76
|
+
source: { flag: "source" },
|
|
58
77
|
window: { value: (flags) => ({ since: flags.since, until: flags.until }) },
|
|
59
78
|
definition: { value: (flags) => JSON.parse(readFileSync(String(flags.definition), "utf8")) },
|
|
60
79
|
},
|
|
@@ -234,6 +253,21 @@ const STEP = {
|
|
|
234
253
|
|
|
235
254
|
export async function cmdUsage(ctx) {
|
|
236
255
|
const { client, flags, io } = ctx;
|
|
256
|
+
if (["sources", "choose-repo"].includes(ctx.positionals[0])) {
|
|
257
|
+
const tool = ctx.positionals[0] === "sources" ? "get_usage_sources" : "choose_product_repo";
|
|
258
|
+
printResult(io, flags, await client.callTool(tool, argsFromFlags(ARGS[tool], flags, [])));
|
|
259
|
+
return 0;
|
|
260
|
+
}
|
|
261
|
+
if (ctx.positionals[0] === "database") {
|
|
262
|
+
const tool = {
|
|
263
|
+
connect: "connect_proof_database",
|
|
264
|
+
status: "get_proof_database",
|
|
265
|
+
disconnect: "disconnect_proof_database",
|
|
266
|
+
}[ctx.positionals[1] ?? "status"];
|
|
267
|
+
if (!tool) throw new CliError("Use database connect, status or disconnect");
|
|
268
|
+
printResult(io, flags, await client.callTool(tool, argsFromFlags(ARGS[tool], flags, [])));
|
|
269
|
+
return 0;
|
|
270
|
+
}
|
|
237
271
|
if (["proofs", "find-proofs", "review-proof", "refresh-proofs"].includes(ctx.positionals[0])) {
|
|
238
272
|
const tool = {
|
|
239
273
|
proofs: "get_proof_actions",
|