@letterstory/cli 0.177.31 → 0.177.33

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
@@ -88,7 +88,7 @@ import {
88
88
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
89
89
 
90
90
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
91
- export const VERSION = "0.177.31";
91
+ export const VERSION = "0.177.33";
92
92
 
93
93
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
94
94
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -5308,7 +5308,7 @@ const BUILD_FAILURES = "/api/superadmin/build-failures";
5308
5308
  const SUGGESTION_REVIEW = "/api/superadmin/suggestion-review";
5309
5309
  const TURN_ENDINGS = "/api/superadmin/turn-endings";
5310
5310
  const ENGINE_USAGE =
5311
- "Usage: admin letterpress status | gaps | telemetry [--days N] [--harness h] [--all-orgs] | tokens [--days N] [--so-far] [--all-orgs] | prs [--days N | --from YYYY-MM-DD [--to YYYY-MM-DD] | --all-time] [--day YYYY-MM-DD] [--org id] [--state merged|open|closed] [--top N] [--tz zone] [--all-orgs] | failures [--days N | --from YYYY-MM-DD [--to YYYY-MM-DD] | --all-time] [--day YYYY-MM-DD] [--org id] [--failure ours|agent|setup|undelivered] [--cause c] [--stopped-at step] [--repo owner/name] [--slow] [--tz zone] [--all-orgs] | blocked [--days N] [--org id] [--all-orgs] | endings [--days N | --since ISO] [--org id,id] [--no-model] [--top N] [--write-cases [--dir evals/letterpress]] | unblock <org-id> <host> <subject> | decisions <org-id> [--site host] [--surface plan|fix|build|site] | undo <org-id> <host> <decision-id> | runs [--status s] [--error-code c] [--first-review-cause agent|context|setup|unknown] [--pr merged|closed|open|none] [--harness h] [--days N] | beyond [--limit N] [--before ISO] | companies | company <org-id> [--site host] | ideas <org-id> [--site host] | suggestions fix|idea [--day YYYY-MM-DD] [--type key [--org id]] [--all-orgs] | suggestions flag fix|idea <type-key> [--org id --item item-id] [--note …] | suggestions clear <flag-id> | facts <org-id> [--site host] | fits [--recipe id] [--org id] [--site host] [--fits yes|no|unknown|waiting] [--limit N] | replay <run-id> | mark <run-id> <item-id> <right|weak|wrong|lead|gap|recipe|clear> [--note …] | settings | set <weights.<ask>.<reading>|lenses.<lens>.bar.<reading>|lenses.<lens>.bar|lenses.<lens>.research.turns|lenses.<lens>.research.ms|asks.<lens>.ask|asks.<lens>.guidance|dismissals.block_days|preflight.off|explore.ask|explore.research.turns|explore.research.ms|explore.every_days> <value>";
5311
+ "Usage: admin letterpress status | gaps | telemetry [--days N] [--harness h] [--all-orgs] | tokens [--days N] [--so-far] [--all-orgs] | prs [--days N | --from YYYY-MM-DD [--to YYYY-MM-DD] | --all-time] [--day YYYY-MM-DD] [--org id] [--state merged|open|closed] [--top N] [--tz zone] [--all-orgs] | failures [--days N | --from YYYY-MM-DD [--to YYYY-MM-DD] | --all-time] [--day YYYY-MM-DD] [--org id] [--failure ours|agent|setup|undelivered] [--cause c] [--stopped-at step] [--repo owner/name] [--slow] [--tz zone] [--all-orgs] | blocked [--days N] [--org id] [--all-orgs] | endings [--days N | --since ISO] [--org id,id] [--no-model] [--top N] [--write-cases [--dir evals/letterpress]] | unblock <org-id> <host> <subject> | decisions <org-id> [--site host] [--surface plan|fix|build|site] | undo <org-id> <host> <decision-id> | runs [--status s] [--error-code c] [--first-review-cause agent|context|setup|unknown] [--pr merged|closed|open|none] [--harness h] [--days N] | beyond [--limit N] [--before ISO] | companies | company <org-id> [--site host] | ideas <org-id> [--site host] [--repo connected|none] | suggestions fix|idea [--day YYYY-MM-DD] [--type key [--org id]] [--all-orgs] | suggestions flag fix|idea <type-key> [--org id --item item-id] [--note …] | suggestions clear <flag-id> | facts <org-id> [--site host] | fits [--recipe id] [--org id] [--site host] [--fits yes|no|unknown|waiting] [--limit N] | replay <run-id> | mark <run-id> <item-id> <right|weak|wrong|lead|gap|recipe|clear> [--note …] | settings | set <weights.<ask>.<reading>|lenses.<lens>.bar.<reading>|lenses.<lens>.bar|lenses.<lens>.research.turns|lenses.<lens>.research.ms|asks.<lens>.ask|asks.<lens>.guidance|dismissals.block_days|preflight.off|explore.ask|explore.research.turns|explore.research.ms|explore.every_days> <value>";
5312
5312
 
5313
5313
  /** One number of the settings from a dotted path and a value: the PUT body save_engine_settings reads. */
5314
5314
  function engineSettingsPatch(path, value) {
@@ -5829,16 +5829,22 @@ async function cmdAdminLetterpress(ctx) {
5829
5829
  return 0;
5830
5830
  }
5831
5831
  case "ideas": {
5832
- // list_company_ideas: the rows the company's Ideas tab lists, with the recipe behind each.
5832
+ // list_company_ideas: the rows the company's Ideas tab lists, with the recipe behind each; --repo connected|none
5833
+ // for the what-if (as they would be with or without a repository, decided fresh, never recorded).
5833
5834
  const org = positionals[1];
5834
5835
  if (!org) throw new CliError(ENGINE_USAGE);
5835
5836
  const q = new URLSearchParams({ org_id: org });
5836
5837
  if (flags.site) q.set("domain", String(flags.site));
5838
+ if (flags.repo !== undefined) {
5839
+ if (!["connected", "none"].includes(String(flags.repo)))
5840
+ throw new CliError("--repo is connected or none.");
5841
+ q.set("repo", String(flags.repo));
5842
+ }
5837
5843
  const r = await staffRequest(ctx, "GET", `${LETTERPRESS}-companies/ideas?${q}`);
5838
5844
  printResult(io, flags, r, (x) =>
5839
5845
  x.ideas.length
5840
5846
  ? [
5841
- `${x.host}: ${x.ideas.length} idea${x.ideas.length === 1 ? "" : "s"}${x.status === "ready" ? "" : ` (${x.status})`}`,
5847
+ `${x.host}: ${x.ideas.length} idea${x.ideas.length === 1 ? "" : "s"}${x.status === "ready" ? "" : ` (${x.status})`}${x.repo ? ` [${x.repo.assumed === "connected" ? "with a repo" : "without a repo"}${x.repo.assumed === x.repo.now ? ", as now" : ""}]` : ""}`,
5842
5848
  ...x.ideas.map(
5843
5849
  (i, n) =>
5844
5850
  `${String(n + 1).padStart(2)}. ${i.title}${i.recipe ? ` [${i.recipe}]` : ""}${i.badge ? ` (${i.badge.label})` : ""}\n ${i.detail ?? i.why}`
@@ -265,21 +265,6 @@ function replicationShow(ctx, result) {
265
265
  function replicationDetail(ctx, result) {
266
266
  printResult(ctx.io, ctx.flags, result, (r) => {
267
267
  const lines = headline(r.replication);
268
- // Waiting for its domain to be verified: the tag for the homepage (then advance --retry checks it).
269
- if (r.domain_verification) {
270
- lines.push(
271
- "",
272
- `Add this tag to the <head> of ${r.domain_verification.host}'s homepage:`,
273
- r.domain_verification.tag
274
- );
275
- if (r.domain_verification.dns)
276
- lines.push(
277
- "",
278
- "Or add this TXT record to its DNS:",
279
- ` Name ${r.domain_verification.dns.name}`,
280
- ` Value ${r.domain_verification.dns.value}`
281
- );
282
- }
283
268
  if (r.pages?.length) {
284
269
  lines.push("", "Pages:");
285
270
  for (const p of r.pages) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.31",
3
+ "version": "0.177.33",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",