@letterstory/cli 0.177.80 → 0.177.81

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
@@ -90,7 +90,7 @@ import {
90
90
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
91
91
 
92
92
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
93
- export const VERSION = "0.177.80";
93
+ export const VERSION = "0.177.81";
94
94
 
95
95
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
96
96
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -5326,7 +5326,7 @@ const BUILD_FAILURES = "/api/superadmin/build-failures";
5326
5326
  const SUGGESTION_REVIEW = "/api/superadmin/suggestion-review";
5327
5327
  const TURN_ENDINGS = "/api/superadmin/turn-endings";
5328
5328
  const ENGINE_USAGE =
5329
- "Usage: admin letterpress status | gaps | asks [--days N] [--people | --letter] [--door d] [--org id] [--limit N] | 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>";
5329
+ "Usage: admin letterpress status | gaps | friction [--kind error|exception|rage|step] [--surface s] [--org id] [--limit N] | asks [--days N] [--surface cmd_l|build_chat|slack|terminal|app|signup|letter] [--people | --letter] [--door d] [--org id] [--limit N] | 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>";
5330
5330
 
5331
5331
  /** One number of the settings from a dotted path and a value: the PUT body save_engine_settings reads. */
5332
5332
  function engineSettingsPatch(path, value) {
@@ -5478,12 +5478,35 @@ async function cmdAdminLetterpress(ctx) {
5478
5478
  );
5479
5479
  return 0;
5480
5480
  }
5481
+ case "friction": {
5482
+ // get_member_friction: what members ran into on screen this week (docs/architecture/failure-visibility.md).
5483
+ const q = new URLSearchParams({ view: "friction" });
5484
+ if (flags.kind) q.set("kind", String(flags.kind));
5485
+ if (flags.surface) q.set("surface", String(flags.surface));
5486
+ if (flags.org) q.set("org_id", String(flags.org));
5487
+ if (flags.limit) q.set("limit", String(flags.limit));
5488
+ const r = await staffRequest(ctx, "GET", `${CODING_TELEMETRY}?${q}`);
5489
+ printResult(io, flags, r, (f) =>
5490
+ [
5491
+ `Seen by members this week${f.computed_at ? ` (read ${f.computed_at}${f.stale ? ", stale" : ""})` : ""}: ${f.totals.kinds} kinds of trouble in ${f.totals.orgs} organizations, ${f.totals.new} new, ${f.totals.spiking} spiking`,
5492
+ ...f.rows.map(
5493
+ (x) =>
5494
+ `${String(x.people).padStart(4)} people ${x.kind.padEnd(9)} ${x.is_new ? "NEW " : x.spiking ? "UP " : " "}${x.message.slice(0, 90)} ${x.pages[0] ?? ""} ${x.orgs
5495
+ .map((o) => o.name)
5496
+ .slice(0, 3)
5497
+ .join(", ")}${x.replays[0] ? ` ${x.replays[0]}` : ""}`
5498
+ ),
5499
+ ].join("\n")
5500
+ );
5501
+ return 0;
5502
+ }
5481
5503
  case "asks": {
5482
5504
  // get_ask_outcomes: did each ask end with what was asked (docs/architecture/failure-visibility.md).
5483
5505
  const q = new URLSearchParams({ view: "asks", days: String(flags.days ?? 7) });
5484
5506
  if (flagBool(flags.people)) q.set("asked_by", "person");
5485
5507
  if (flagBool(flags.letter)) q.set("asked_by", "letter");
5486
5508
  if (flags.door) q.set("door", String(flags.door));
5509
+ if (flags.surface) q.set("surface", String(flags.surface));
5487
5510
  if (flags.org) q.set("org_id", String(flags.org));
5488
5511
  if (flags.limit) q.set("limit", String(flags.limit));
5489
5512
  const r = await staffRequest(ctx, "GET", `${CODING_TELEMETRY}?${q}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.80",
3
+ "version": "0.177.81",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",