@letterstory/cli 0.176.63 → 0.176.65

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
@@ -85,7 +85,7 @@ import {
85
85
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
86
86
 
87
87
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
88
- export const VERSION = "0.176.63";
88
+ export const VERSION = "0.176.65";
89
89
 
90
90
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
91
91
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -1055,6 +1055,9 @@ Admin (STAFF key — --staff-key / LETTERSTORY_STAFF_API_KEY; acts before an org
1055
1055
  --recipe every account whose verdict on it is missing
1056
1056
  or stale; neither, every account stale for the library.
1057
1057
  Each is a model call. Needs recipes:write.
1058
+ admin recipes reread --org <id>,… Read these companies from their sites again: what was
1059
+ only ever inferred is replaced, what the company changed
1060
+ is kept. Refit them after. Needs recipes:write.
1058
1061
  admin letterpress status [--customers] Letterpress as it runs now: per lens its mode, bar, recipes,
1059
1062
  runs, model and prompt hash, how often the shadow agreed,
1060
1063
  how runs grounded (a recipe / none). Needs recipes:read.
@@ -1968,7 +1971,7 @@ Replicate (the Replicator: a website rebuilt as a native Next.js repo, page for
1968
1971
  replicate [list] Your replications: stage, how closely each matches
1969
1972
  replicate show <id> [--failing] Pages with their routes and pixel match; collections; events
1970
1973
  replicate attach <id> <repo-name> [--repo-owner <o>] The repo to commit it into (yours; Letter never creates it)
1971
- replicate advance <id> [--retry] Move it on now; --retry once blocked_on is done
1974
+ replicate advance <id> [--retry] [--again] Move it on now; --retry once blocked_on is done; --again replicates from the start
1972
1975
  replicate archive <id> Stop it; the project stays in storage and in the repo
1973
1976
 
1974
1977
  Evals (how the pipeline is doing on your posts, and the regression cases captured from them):
@@ -5977,6 +5977,24 @@ async function cmdAdminRecipes(ctx) {
5977
5977
  );
5978
5978
  return result.outcomes?.some((o) => o.status === "failed") ? 1 : 0;
5979
5979
  }
5980
+ case "reread": {
5981
+ // reread_companies: companies read from their sites again, only what was only ever inferred replaced.
5982
+ const orgs = (flagStr(flags.org) ?? "")
5983
+ .split(",")
5984
+ .map((s) => s.trim())
5985
+ .filter(Boolean);
5986
+ if (!orgs.length) throw new CliError("Name the accounts: --org <id>,…");
5987
+ const result = await staffPost(ctx, `${RECIPES}/reread`, { org_ids: orgs });
5988
+ printResult(io, flags, result, (r) =>
5989
+ r.outcomes
5990
+ .map(
5991
+ (o) =>
5992
+ `${o.status.padEnd(15)} ${(o.domain ?? "—").padEnd(28)} ${o.org_id}${o.fields.length ? ` ${o.fields.join(", ")}` : ""}${o.reason ? ` ${o.reason}` : ""}`
5993
+ )
5994
+ .join("\n")
5995
+ );
5996
+ return result.outcomes?.some((o) => o.status === "failed") ? 1 : 0;
5997
+ }
5980
5998
  case "delete": {
5981
5999
  const id = requirePositional(positionals, 1, "id");
5982
6000
  if (!flagBool(flags.yes)) {
@@ -9,7 +9,7 @@
9
9
  // letterstory replicate list
10
10
  // letterstory replicate show <id> [--failing]
11
11
  // letterstory replicate attach <id> <repo-name> [--repo-owner <account>]
12
- // letterstory replicate advance <id> [--retry]
12
+ // letterstory replicate advance <id> [--retry] [--again]
13
13
  // letterstory replicate archive <id>
14
14
 
15
15
  import { CliError } from "../client.mjs";
@@ -35,7 +35,11 @@ export const ARGS = {
35
35
  repo_name: { positional: 1, label: "repo-name", required: true },
36
36
  repo_owner: "repo-owner",
37
37
  },
38
- advance_replication: { replication_id: replicationId, retry: { flag: "retry", type: "bool" } },
38
+ advance_replication: {
39
+ replication_id: replicationId,
40
+ retry: { flag: "retry", type: "bool" },
41
+ again: { flag: "again", type: "bool" },
42
+ },
39
43
  archive_replication: { replication_id: replicationId },
40
44
  };
41
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.176.63",
3
+ "version": "0.176.65",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",