@letterstory/cli 0.176.103 → 0.176.104

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
@@ -87,7 +87,7 @@ import {
87
87
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
88
88
 
89
89
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
90
- export const VERSION = "0.176.103";
90
+ export const VERSION = "0.176.104";
91
91
 
92
92
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
93
93
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -5264,7 +5264,7 @@ const PULL_REQUESTS = "/api/superadmin/pull-requests";
5264
5264
  const PLATFORM_USAGE = "/api/superadmin/usage/platform";
5265
5265
  const BUILD_FAILURES = "/api/superadmin/build-failures";
5266
5266
  const ENGINE_USAGE =
5267
- "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] | 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] | 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>";
5267
+ "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] | 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] | 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>";
5268
5268
 
5269
5269
  /** One number of the settings from a dotted path and a value: the PUT body save_engine_settings reads. */
5270
5270
  function engineSettingsPatch(path, value) {
@@ -5731,6 +5731,26 @@ async function cmdAdminLetterpress(ctx) {
5731
5731
  );
5732
5732
  return 0;
5733
5733
  }
5734
+ case "ideas": {
5735
+ // list_company_ideas: the rows the company's Ideas tab lists, with the recipe behind each.
5736
+ const org = positionals[1];
5737
+ if (!org) throw new CliError(ENGINE_USAGE);
5738
+ const q = new URLSearchParams({ org_id: org });
5739
+ if (flags.site) q.set("domain", String(flags.site));
5740
+ const r = await staffRequest(ctx, "GET", `${LETTERPRESS}-companies/ideas?${q}`);
5741
+ printResult(io, flags, r, (x) =>
5742
+ x.ideas.length
5743
+ ? [
5744
+ `${x.host}: ${x.ideas.length} idea${x.ideas.length === 1 ? "" : "s"}${x.status === "ready" ? "" : ` (${x.status})`}`,
5745
+ ...x.ideas.map(
5746
+ (i, n) =>
5747
+ `${String(n + 1).padStart(2)}. ${i.title}${i.recipe ? ` [${i.recipe}]` : ""}${i.badge ? ` (${i.badge.label})` : ""}\n ${i.detail ?? i.why}`
5748
+ ),
5749
+ ].join("\n")
5750
+ : x.message
5751
+ );
5752
+ return 0;
5753
+ }
5734
5754
  case "facts": {
5735
5755
  // list_account_facts: what the verdicts rest on.
5736
5756
  const org = positionals[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.176.103",
3
+ "version": "0.176.104",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",