@letterstory/cli 0.177.217 → 0.177.219
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/repo.mjs +16 -0
- package/lib/commands/visits.mjs +20 -1
- 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.219";
|
|
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;
|
|
@@ -2165,6 +2165,7 @@ Repo changes (Claude Code edits your repo in a sandbox; the Letter GitHub App op
|
|
|
2165
2165
|
[--detail full] one row per run by default; full: every field
|
|
2166
2166
|
repo publish <run-id> Make PR on a preview in review
|
|
2167
2167
|
repo merge <run-id> Merge its open PR (a squash; the repo's branch rules decide)
|
|
2168
|
+
repo keep-open <run-id> Take back a merge asked for; its PR stays open for Merge
|
|
2168
2169
|
repo revise <run-id> --instructions <text>|--instructions-file <path|->|--review-issues [--copy-edits-file <path|->] [--letter-writes]
|
|
2169
2170
|
[--attach <path>]… [--attach-ref <path>]… [--attach-url name=url]… [--attach-url-ref name=url]…
|
|
2170
2171
|
Ask for more on a preview (it takes over the preview's link) or an
|
|
@@ -2191,6 +2192,7 @@ Visits (Visitors: AI agents reading your site, and AI answers sending people to
|
|
|
2191
2192
|
visits export [--since 30d] [--format json|csv] [--table agent_visits|citations] [--include agents|people|companies] [--icp|--not-icp]
|
|
2192
2193
|
visits sites Your Visitors sites and their install checks
|
|
2193
2194
|
visits domain <domain> [--site <id>] [--name <n>] Move a site to a new domain, keeping its key
|
|
2195
|
+
visits send-install <email> [--site <id>] Email the install to whoever runs the coding agent
|
|
2194
2196
|
visits pages [--since 28d] [--path '/docs/*'] [--agent <id>] [--limit <n>] [--site <id>]
|
|
2195
2197
|
People and AI agents per page
|
|
2196
2198
|
visits health --site <id> Staff: how far to trust a site's numbers, each check and its fix
|
package/lib/commands/repo.mjs
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// repo list → list_repo_changes repo cancel → cancel_repo_change
|
|
7
7
|
// repo publish → publish_repo_change (Make PR on a preview)
|
|
8
8
|
// repo merge → merge_repo_change (merge its open PR, as a squash)
|
|
9
|
+
// repo keep-open → keep_repo_change_open (take back a merge asked for; its PR stays open)
|
|
9
10
|
// repo retry → retry_repo_change (try a failed change again: same ask, fresh run)
|
|
10
11
|
// repo revise → revise_repo_change (ask for more on a preview or an open PR; --copy-edits-file for exact copy)
|
|
11
12
|
// repo address-reviews → address_pr_review (answer the review comments on its open PR: fix, reply, resolve)
|
|
@@ -316,6 +317,7 @@ const ARGS = {
|
|
|
316
317
|
},
|
|
317
318
|
publish_repo_change: { run_id: { positional: 0, required: true, label: "run-id" } },
|
|
318
319
|
merge_repo_change: { run_id: { positional: 0, required: true, label: "run-id" } },
|
|
320
|
+
keep_repo_change_open: { run_id: { positional: 0, required: true, label: "run-id" } },
|
|
319
321
|
retry_repo_change: { run_id: { positional: 0, required: true, label: "run-id" } },
|
|
320
322
|
revise_repo_change: {
|
|
321
323
|
run_id: { positional: 0, required: true, label: "run-id" },
|
|
@@ -446,6 +448,8 @@ export async function cmdRepo(ctx) {
|
|
|
446
448
|
return repoPublish(rest);
|
|
447
449
|
case "merge":
|
|
448
450
|
return repoMerge(rest);
|
|
451
|
+
case "keep-open":
|
|
452
|
+
return repoKeepOpen(rest);
|
|
449
453
|
case "retry":
|
|
450
454
|
return repoRetry(rest);
|
|
451
455
|
case "revise":
|
|
@@ -874,6 +878,18 @@ async function repoMerge(ctx) {
|
|
|
874
878
|
return 0;
|
|
875
879
|
}
|
|
876
880
|
|
|
881
|
+
/** `repo keep-open <run-id>`: take back a merge asked for on a change that hasn't merged; its PR waits for Merge. */
|
|
882
|
+
async function repoKeepOpen(ctx) {
|
|
883
|
+
const { client, flags, io } = ctx;
|
|
884
|
+
const result = await client.callTool(
|
|
885
|
+
"keep_repo_change_open",
|
|
886
|
+
argsFromFlags(ARGS.keep_repo_change_open, flags, ctx.positionals)
|
|
887
|
+
);
|
|
888
|
+
ok(ctx, result.message);
|
|
889
|
+
printResult(io, flags, result.run, describe);
|
|
890
|
+
return 0;
|
|
891
|
+
}
|
|
892
|
+
|
|
877
893
|
/** `repo retry <run-id>`: try a failed change again, as a fresh run with the same ask and options. */
|
|
878
894
|
async function repoRetry(ctx) {
|
|
879
895
|
const { client, flags, io } = ctx;
|
package/lib/commands/visits.mjs
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// letterstory visits export --include people --icp > icp.csv the people who fit your ICP, as Humans shows them
|
|
18
18
|
// letterstory visits sites [--install] (--install adds each site's script)
|
|
19
19
|
// letterstory visits domain composal.com [--site <id>] move the site to a new domain, keeping its key
|
|
20
|
+
// letterstory visits send-install sam@acme.com [--site <id>] email the install to whoever runs the coding agent
|
|
20
21
|
// letterstory visits pages --since 28d [--path '/docs/*'] [--agent openai-crawler]
|
|
21
22
|
// letterstory visits health --site <id> staff: how far to trust a site's numbers, and what to fix
|
|
22
23
|
// letterstory visits agent-sites [--include-test] [--figures] [--from <ISO>] [--to <ISO>]
|
|
@@ -92,6 +93,10 @@ export const ARGS = {
|
|
|
92
93
|
domain: { positional: 0, label: "new domain (e.g. acme.com)", required: true },
|
|
93
94
|
name: "name",
|
|
94
95
|
},
|
|
96
|
+
visitors_send_install: {
|
|
97
|
+
site_id: "site",
|
|
98
|
+
email: { positional: 0, label: "email of whoever runs the coding agent", required: true },
|
|
99
|
+
},
|
|
95
100
|
visitors_get_agent_visits: {
|
|
96
101
|
site_id: "site",
|
|
97
102
|
days,
|
|
@@ -337,6 +342,8 @@ export async function cmdVisits(ctx) {
|
|
|
337
342
|
return visitsSites(rest);
|
|
338
343
|
case "domain":
|
|
339
344
|
return visitsDomain(rest);
|
|
345
|
+
case "send-install":
|
|
346
|
+
return visitsSendInstall(rest);
|
|
340
347
|
case "pages":
|
|
341
348
|
return visitsPages(rest);
|
|
342
349
|
case "health":
|
|
@@ -355,7 +362,7 @@ export async function cmdVisits(ctx) {
|
|
|
355
362
|
return visitsTransact(rest);
|
|
356
363
|
default:
|
|
357
364
|
throw new CliError(
|
|
358
|
-
"Usage: visits [list|requests|citations|people|who|path|compare|export|sites|domain|pages|health|agent-sites|connect|connectors|disconnect|shortcut|transact]"
|
|
365
|
+
"Usage: visits [list|requests|citations|people|who|path|compare|export|sites|domain|send-install|pages|health|agent-sites|connect|connectors|disconnect|shortcut|transact]"
|
|
359
366
|
);
|
|
360
367
|
}
|
|
361
368
|
}
|
|
@@ -894,6 +901,18 @@ async function visitsDomain(ctx) {
|
|
|
894
901
|
return 0;
|
|
895
902
|
}
|
|
896
903
|
|
|
904
|
+
async function visitsSendInstall(ctx) {
|
|
905
|
+
const { flags, io } = ctx;
|
|
906
|
+
const result = await call(ctx, "visitors_send_install");
|
|
907
|
+
printResult(io, flags, result, (r) =>
|
|
908
|
+
[
|
|
909
|
+
`Sent to ${r.email}${r.invited ? " (invited to the workspace)" : ""}.`,
|
|
910
|
+
...(r.email_sent ? [] : [`The email didn't go. Share this link: ${r.link}`]),
|
|
911
|
+
].join("\n")
|
|
912
|
+
);
|
|
913
|
+
return 0;
|
|
914
|
+
}
|
|
915
|
+
|
|
897
916
|
async function visitsSites(ctx) {
|
|
898
917
|
const { flags, io } = ctx;
|
|
899
918
|
const result = await call(ctx, "visitors_list_sites");
|