@letterstory/cli 0.175.7 → 0.175.9
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 +1 -1
- package/lib/commands/admin.mjs +11 -4
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
} from "./commands.mjs";
|
|
78
78
|
|
|
79
79
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
80
|
-
export const VERSION = "0.175.
|
|
80
|
+
export const VERSION = "0.175.9";
|
|
81
81
|
|
|
82
82
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
83
83
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
package/lib/commands/admin.mjs
CHANGED
|
@@ -5127,7 +5127,7 @@ const ENGINE = "/api/superadmin/engine-settings";
|
|
|
5127
5127
|
const LETTERPRESS = "/api/superadmin/letterpress";
|
|
5128
5128
|
const CODING_TELEMETRY = "/api/superadmin/coding-telemetry";
|
|
5129
5129
|
const ENGINE_USAGE =
|
|
5130
|
-
"Usage: admin letterpress status | gaps | telemetry [--days N] [--harness h] [--all-orgs] | runs [--status s] [--error-code c] [--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] [--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|explore.ask|explore.research.turns|explore.research.ms|explore.every_days> <value>";
|
|
5130
|
+
"Usage: admin letterpress status | gaps | telemetry [--days N] [--harness h] [--all-orgs] | 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|explore.ask|explore.research.turns|explore.research.ms|explore.every_days> <value>";
|
|
5131
5131
|
|
|
5132
5132
|
/** One number of the settings from a dotted path and a value: the PUT body save_engine_settings reads. */
|
|
5133
5133
|
function engineSettingsPatch(path, value) {
|
|
@@ -5270,6 +5270,12 @@ async function cmdAdminLetterpress(ctx) {
|
|
|
5270
5270
|
t.moved.length
|
|
5271
5271
|
? `moved beyond chance: ${t.moved.map((m) => `${m.measure} ${m.direction}`).join(", ")}`
|
|
5272
5272
|
: "nothing moved beyond chance",
|
|
5273
|
+
`right on the first try: ${pct(t.first_pass.clean)} of ${t.first_pass.reviewed} reviewed (was ${pct(t.first_pass_previous.clean)}); repo checks clean ${pct(t.first_pass.checks_clean)}`,
|
|
5274
|
+
...t.first_pass.gaps
|
|
5275
|
+
.slice(0, 3)
|
|
5276
|
+
.map(
|
|
5277
|
+
(g) => ` missed (${g.cause}, ${g.category}): ${g.runs} runs. ${g.notes[0] ?? g.what_to_do}`
|
|
5278
|
+
),
|
|
5273
5279
|
t.failures.length
|
|
5274
5280
|
? `failures: ${t.failures.map((f) => `${f.error_code} ${f.count} (was ${f.previous}, ${f.fault})`).join(", ")}`
|
|
5275
5281
|
: "no failures",
|
|
@@ -5288,6 +5294,7 @@ async function cmdAdminLetterpress(ctx) {
|
|
|
5288
5294
|
for (const [flag, key] of [
|
|
5289
5295
|
["status", "status"],
|
|
5290
5296
|
["error-code", "error_code"],
|
|
5297
|
+
["first-review-cause", "first_review_cause"],
|
|
5291
5298
|
["harness", "harness"],
|
|
5292
5299
|
["pr", "pr"],
|
|
5293
5300
|
])
|
|
@@ -5331,7 +5338,7 @@ async function cmdAdminLetterpress(ctx) {
|
|
|
5331
5338
|
? x.companies
|
|
5332
5339
|
.map(
|
|
5333
5340
|
(c) =>
|
|
5334
|
-
`${(c.last_decided_at ?? "waiting").slice(0, 16).padEnd(16)} ${(c.name ?? c.host).padEnd(28)} ${c.host.padEnd(26)} fit ${String(c.yes).padStart(2)} no ${String(c.no).padStart(2)} unknown ${String(c.unknown).padStart(2)} ${c.org_id}`
|
|
5341
|
+
`${(c.last_decided_at ?? "waiting").slice(0, 16).padEnd(16)} ${(c.name ?? c.host).padEnd(28)} ${c.host.padEnd(26)} fit ${String(c.yes).padStart(2)} waiting ${String(c.awaiting).padStart(2)} no ${String(c.no).padStart(2)} unknown ${String(c.unknown).padStart(2)} ${c.org_id}`
|
|
5335
5342
|
)
|
|
5336
5343
|
.join("\n")
|
|
5337
5344
|
: "No company has a fit yet."
|
|
@@ -5350,7 +5357,7 @@ async function cmdAdminLetterpress(ctx) {
|
|
|
5350
5357
|
`${c.org.name ?? c.org.id} · ${c.host} · ${c.beyond_library} ask${c.beyond_library === 1 ? "" : "s"} went past the library`,
|
|
5351
5358
|
...c.verdicts.map(
|
|
5352
5359
|
(v) =>
|
|
5353
|
-
` ${v.fits.padEnd(7)} ${v.recipe}: ${v.fits === "unknown" ? `needs ${v.needs}` : v.why} [reads ${v.reads.join(", ") || "—"}]`
|
|
5360
|
+
` ${v.fits.padEnd(7)} ${v.recipe}: ${v.fits === "unknown" ? `needs ${v.needs}` : v.fits === "waiting" ? `waiting on ${v.waiting_on}` : v.why} [reads ${v.reads.join(", ") || "—"}]`
|
|
5354
5361
|
),
|
|
5355
5362
|
...c.facts.stored.map(
|
|
5356
5363
|
(f) =>
|
|
@@ -5403,7 +5410,7 @@ async function cmdAdminLetterpress(ctx) {
|
|
|
5403
5410
|
? x.fits
|
|
5404
5411
|
.map(
|
|
5405
5412
|
(f) =>
|
|
5406
|
-
`${f.decided_at.slice(0, 16)} ${f.host} ${f.fits.padEnd(7)} ${f.recipe}: ${f.fits === "unknown" ? `needs ${f.needs}` : f.why}`
|
|
5413
|
+
`${f.decided_at.slice(0, 16)} ${f.host} ${f.fits.padEnd(7)} ${f.recipe}: ${f.fits === "unknown" ? `needs ${f.needs}` : f.fits === "waiting" ? `waiting on ${f.waiting_on}` : f.why}`
|
|
5407
5414
|
)
|
|
5408
5415
|
.join("\n")
|
|
5409
5416
|
: "No verdicts match."
|