@letterstory/cli 0.87.0 → 0.87.1
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 +4 -2
- package/lib/commands/admin.mjs +34 -3
- package/lib/commands/collections.mjs +2 -0
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
} from "./commands.mjs";
|
|
58
58
|
|
|
59
59
|
// Keep in sync with cli/package.json.
|
|
60
|
-
export const VERSION = "0.87.
|
|
60
|
+
export const VERSION = "0.87.1";
|
|
61
61
|
|
|
62
62
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
63
63
|
// can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
|
|
@@ -68,6 +68,8 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
68
68
|
"confirm-missing-target",
|
|
69
69
|
"no-wait",
|
|
70
70
|
"no-checklist",
|
|
71
|
+
"no-control",
|
|
72
|
+
"own-beat",
|
|
71
73
|
"refresh",
|
|
72
74
|
"accept",
|
|
73
75
|
"help",
|
|
@@ -347,7 +349,7 @@ Collections:
|
|
|
347
349
|
preferred sites — dry, nothing written. Proposals are judged by fit.
|
|
348
350
|
collections preferred-preview <id>
|
|
349
351
|
Step 2: the proposals ranked, what the ceiling chooses, and the 1-in-N.
|
|
350
|
-
collections cite-preferred <id>
|
|
352
|
+
collections cite-preferred <id> [--exclude <article-id> …]
|
|
351
353
|
Step 3: apply exactly the chosen sentences, then republish.
|
|
352
354
|
|
|
353
355
|
Authors (the per-collection author bank — recurring bylines):
|
package/lib/commands/admin.mjs
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// (feedback-add --fix "…" files the reader's rewrite; the diff is classified and a disposition suggested.
|
|
13
13
|
// The old names — evals, eval-add, eval-set, proposals, propose-eval, capture-eval, reject-eval — still work.)
|
|
14
14
|
// admin evals scoreboard|cases|runs|run|triage|guard|retire … (fleet:read / tuning:experiment)
|
|
15
|
-
// admin fleet-experiments list|articles|mark|unmark|new|assign|assign-eligible|assign-orgs|apply|start|stop|decide … (fleet:read / fleet:experiment)
|
|
15
|
+
// admin fleet-experiments list|articles|clients|mark|unmark|new|assign|assign-eligible|assign-orgs|spin-up|apply|start|stop|decide … (fleet:read / fleet:experiment)
|
|
16
16
|
// admin crm import|capture|signals|record|signal|accounts|account|score|slack-channels|link-slack|white-glove|set-white-glove|churn|record-churn|undo-churn|onboard|onboarding|retry-onboarding|onboard-plan|payment-link … (crm:read / crm:write)
|
|
17
17
|
// admin spend summary|reconcile|pnl|entries|add|import|usage|remove|reference|stripe-sync|services|service … (spend:read / spend:write)
|
|
18
18
|
// admin replays [--org <id>] [--target <id>] [--status …] [--limit n] (fleet:read)
|
|
@@ -3466,7 +3466,7 @@ async function cmdAdminFleetExperiments(ctx) {
|
|
|
3466
3466
|
const specFile = flagStr(flags["spec-file"]);
|
|
3467
3467
|
if (!template && !specFile)
|
|
3468
3468
|
throw new CliError(
|
|
3469
|
-
"Usage: admin fleet-experiments new --template sponsor_disclosure_v1|sponsor_disclosure_clients_v1|article_disclosure_v1|mention_degree_v1|citation_shape_v1 | --spec-file spec.json"
|
|
3469
|
+
"Usage: admin fleet-experiments new --template sponsor_disclosure_v1|sponsor_disclosure_clients_v1|sponsor_disclosure_fresh_v1|article_disclosure_v1|mention_degree_v1|citation_shape_v1 | --spec-file spec.json"
|
|
3470
3470
|
);
|
|
3471
3471
|
const body = template
|
|
3472
3472
|
? { action: "create_template", template }
|
|
@@ -3500,6 +3500,37 @@ async function cmdAdminFleetExperiments(ctx) {
|
|
|
3500
3500
|
return lines.join("\n") || "ok";
|
|
3501
3501
|
});
|
|
3502
3502
|
}
|
|
3503
|
+
case "clients":
|
|
3504
|
+
return out(await staffRequest(ctx, "GET", `${FLEET_EXPERIMENTS}/clients`), (r) =>
|
|
3505
|
+
r.clients.length
|
|
3506
|
+
? r.clients
|
|
3507
|
+
.map((c) => `${c.name} ${c.domain} ${c.sites} site${c.sites === 1 ? "" : "s"}`)
|
|
3508
|
+
.join("\n")
|
|
3509
|
+
: "(no clients)"
|
|
3510
|
+
);
|
|
3511
|
+
case "spin-up": {
|
|
3512
|
+
const org = rest.find(Boolean);
|
|
3513
|
+
if (!id || !org)
|
|
3514
|
+
throw new CliError(
|
|
3515
|
+
"Usage: admin fleet-experiments spin-up <experiment-id> <org-domain-or-id> [--no-control] [--own-beat] [--posts n]"
|
|
3516
|
+
);
|
|
3517
|
+
const body = {
|
|
3518
|
+
action: "spin_up",
|
|
3519
|
+
experiment_id: id,
|
|
3520
|
+
org,
|
|
3521
|
+
control: !flagBool(flags["no-control"]),
|
|
3522
|
+
match: flagBool(flags["own-beat"]) ? "own_beat" : "twin",
|
|
3523
|
+
...(flagStr(flags.posts) ? { posts_to_seed: Number(flagStr(flags.posts)) } : {}),
|
|
3524
|
+
};
|
|
3525
|
+
return out(await action(body), (r) =>
|
|
3526
|
+
[
|
|
3527
|
+
r.twins
|
|
3528
|
+
? `launching twins for ${r.org.name} on "${r.sites[0]?.beat}":`
|
|
3529
|
+
: `launching for ${r.org.name}:`,
|
|
3530
|
+
...r.sites.map((s) => ` ${s.arm}: ${s.name ?? s.beat} (onboarding ${s.jobId})`),
|
|
3531
|
+
].join("\n")
|
|
3532
|
+
);
|
|
3533
|
+
}
|
|
3503
3534
|
case "start":
|
|
3504
3535
|
case "stop":
|
|
3505
3536
|
if (!id) throw new CliError(`Usage: admin fleet-experiments ${sub} <experiment-id>`);
|
|
@@ -3512,7 +3543,7 @@ async function cmdAdminFleetExperiments(ctx) {
|
|
|
3512
3543
|
}
|
|
3513
3544
|
default:
|
|
3514
3545
|
throw new CliError(
|
|
3515
|
-
'Usage: admin fleet-experiments list | articles [--experiment <id>] [--org <id>] [--filter all|assigned|unassigned] [--arm <arm>] [--q …] [--limit n] [--offset n] | mark <experiment-id> <article-id…> --arm <arm> | unmark <experiment-id> <article-id…> | new --template <key> | start|stop <experiment-id> | decide <experiment-id> --decision "…"'
|
|
3546
|
+
'Usage: admin fleet-experiments list | articles [--experiment <id>] [--org <id>] [--filter all|assigned|unassigned] [--arm <arm>] [--q …] [--limit n] [--offset n] | mark <experiment-id> <article-id…> --arm <arm> | unmark <experiment-id> <article-id…> | new --template <key> | clients | spin-up <experiment-id> <org> [--no-control] [--own-beat] | start|stop <experiment-id> | decide <experiment-id> --decision "…"'
|
|
3516
3547
|
);
|
|
3517
3548
|
}
|
|
3518
3549
|
}
|
|
@@ -55,6 +55,8 @@ export const ARGS = {
|
|
|
55
55
|
},
|
|
56
56
|
cite_preferred_sources: {
|
|
57
57
|
collection_id: { positional: 0, label: "collection-id", required: true },
|
|
58
|
+
// Chosen posts a reviewer decided against.
|
|
59
|
+
exclude_article_ids: { flag: "exclude", type: "list" },
|
|
58
60
|
},
|
|
59
61
|
update_auto_pen_config: {
|
|
60
62
|
collection_id: { positional: 0, label: "collection-id", required: true },
|