@letterstory/cli 0.177.157 → 0.177.159

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 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.157";
96
+ export const VERSION = "0.177.159";
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;
@@ -673,6 +673,7 @@ Collections (the content engine as a primitive — one door, 'collection run'):
673
673
  collection runs [--collection <id>] [--status <s>] [--limit <n>]
674
674
  collection approve <run-id> [--now] Answer the gate (--now publishes immediately)
675
675
  collection start <run-id> Start a scheduled slot's writing now (it goes live at its slot)
676
+ collection retry-publish <run-id> Retry publishing the saved draft
676
677
  collection rewrite <run-id> Rewrite a held post to its finding (skip_code held_guard in collection runs)
677
678
  collection move <run-id> --date YYYY-MM-DD Move a slot not yet written, or an approved written post, to another day
678
679
  collection cancel <run-id>
@@ -2168,7 +2169,7 @@ Domains (the domains you hold, and free ones that match what people search):
2168
2169
  domains plan <domain> [--phrase "<search>"] [--searches <n>] [--version <version>] [--no-write]
2169
2170
  The most strategic site for the domain, every version
2170
2171
  scored, and whether it can launch; spends nothing
2171
- domains launch <domain> [--phrase …] [--searches …] [--version <version>] [--words "<plan words>"]
2172
+ domains launch <domain> [--writing on|off] [--phrase …] [--searches …] [--version <version>] [--words "<plan words>"]
2172
2173
  [--prompt "<what to build>"] [--look-like a.com,b.com] --yes
2173
2174
  Build and Launch Site: buys the domain if needed, builds
2174
2175
  the plan and puts it live
@@ -2192,7 +2193,7 @@ Vary (A/B tests of a page's words and images on your own site):
2192
2193
 
2193
2194
  Deploy (websites and apps Letter builds from your words and hosts on their own domains):
2194
2195
  deploy [list] [--kind app|phantom|bench] Everything deployed: apps, phantoms (and benches, for staff)
2195
- deploy create "<what it is and who it is for>" [--name <n>] [--domain <d> | --preview] [--ref <visual-ref-id>] [--wait]
2196
+ deploy create "<what it is and who it is for>" [--name <n>] [--domain <d> | --preview] [--writing on|off] [--ref <visual-ref-id>] [--wait]
2196
2197
  Named, given a domain (bought under $30 unless you name one),
2197
2198
  built by Letterpress-1 with Visitors in it, and put live;
2198
2199
  --ref designs it after a Visual Ref (refs create)
@@ -138,6 +138,9 @@ export const ARGS = {
138
138
  start_collection_run: {
139
139
  run_id: { positional: 0, label: "run-id", required: true },
140
140
  },
141
+ retry_collection_publish: {
142
+ run_id: { positional: 0, label: "run-id", required: true },
143
+ },
141
144
  release_held_post: {
142
145
  run_id: { positional: 0, label: "run-id", required: true },
143
146
  },
@@ -193,6 +196,11 @@ export async function cmdCollection(ctx) {
193
196
  return collectionCancel(rest);
194
197
  case "start":
195
198
  return collectionStart(rest);
199
+ case "retry-publish": {
200
+ const args = argsFromFlags(ARGS.retry_collection_publish, rest.flags, rest.positionals);
201
+ printResult(rest.io, rest.flags, await rest.client.callTool("retry_collection_publish", args));
202
+ return 0;
203
+ }
196
204
  case "rewrite":
197
205
  return collectionRewrite(rest);
198
206
  case "move":
@@ -208,7 +216,7 @@ export async function cmdCollection(ctx) {
208
216
  return collectionMentions(rest);
209
217
  default:
210
218
  throw new CliError(
211
- `Unknown collection subcommand: ${sub ?? "(none)"}. Try: list, overview, new, config, delete, run, add, queue, headline, run-status, runs, approve, start, move, cancel, inventory, links, mentions`
219
+ `Unknown collection subcommand: ${sub ?? "(none)"}. Try: list, overview, new, config, delete, run, add, queue, headline, run-status, runs, approve, start, retry-publish, move, cancel, inventory, links, mentions`
212
220
  );
213
221
  }
214
222
  }
@@ -31,6 +31,7 @@ export const ARGS = {
31
31
  prompt: { value: (flags, positionals) => flagStr(flags.prompt) ?? (positionals.join(" ").trim() || undefined) },
32
32
  name: "name",
33
33
  domain: "domain",
34
+ writing: { flag: "writing", enum: ["on", "off"] },
34
35
  visual_ref_id: { flag: "ref" },
35
36
  wait: { flag: "wait", type: "bool" },
36
37
  // --no-spend: buy nothing; the domain is one you hold, or one registered elsewhere.
@@ -73,6 +73,7 @@ export const ARGS = {
73
73
  launch_domain_site: {
74
74
  domain: { value: (flags, positionals) => stripScheme(requirePositional(positionals, 0, "domain")) },
75
75
  phrase: { flag: "phrase" },
76
+ writing: { flag: "writing", enum: ["on", "off"] },
76
77
  monthly_searches: { flag: "searches", type: "num" },
77
78
  version: { flag: "version" },
78
79
  // The words of a plan already read (`domains plan … --json`'s plan.words): that plan is built as it was.
@@ -29,6 +29,7 @@
29
29
  // letterstory visits transact remove <source-id>
30
30
  // letterstory visits transact test "What does it cost?"
31
31
  // letterstory visits transact asks [--since 7d] [--limit 50]
32
+ // letterstory visits transact learnings [--since 7d]
32
33
 
33
34
  import { CliError } from "../client.mjs";
34
35
  import { flagStr, printResult, argsFromFlags } from "./shared.mjs";
@@ -178,6 +179,7 @@ export const ARGS = {
178
179
  update: { flag: "update", type: "bool" },
179
180
  },
180
181
  visitors_list_transact_asks: { site_id: "site", days, limit: { flag: "limit", type: "num" } },
182
+ visitors_get_transact_learnings: { site_id: "site", days },
181
183
  visitors_export: {
182
184
  site_id: "site",
183
185
  days,
@@ -350,7 +352,7 @@ function transactLines(t) {
350
352
  return lines;
351
353
  }
352
354
 
353
- /** `visits transact`: read it; `on` / `off`; `add <kind> …`; `source <id>`; `remove <id>`; `test "…"`; `pr`; `asks`. */
355
+ /** `visits transact`: read it; `on` / `off`; `add <kind> …`; `source <id>`; `remove <id>`; `test "…"`; `pr`; `asks`; `learnings`. */
354
356
  async function visitsTransact(ctx) {
355
357
  const { flags, io } = ctx;
356
358
  const sub = ctx.positionals[0];
@@ -412,6 +414,13 @@ async function visitsTransact(ctx) {
412
414
  printResult(io, flags, await call(rest, "visitors_open_transact_pr"));
413
415
  return 0;
414
416
  }
417
+ if (sub === "learnings") {
418
+ const result = await call(rest, "visitors_get_transact_learnings");
419
+ printResult(io, flags, result, (r) =>
420
+ r.learnings.length ? r.learnings.map((l) => `- ${l.text}`).join("\n") : "No asks yet"
421
+ );
422
+ return 0;
423
+ }
415
424
  if (sub === "asks") {
416
425
  const result = await call(rest, "visitors_list_transact_asks");
417
426
  printResult(io, flags, result, (r) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.157",
3
+ "version": "0.177.159",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",