@letterstory/cli 0.176.64 → 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.64";
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.
@@ -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)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.176.64",
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",