@letterstory/cli 0.72.2 → 0.73.0
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/README.md +2 -0
- package/lib/cli.mjs +1 -1
- package/lib/commands/admin.mjs +45 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -368,6 +368,8 @@ letterstory admin tuning bank-judge <eval-id> --prompt-file judge.md --mode scor
|
|
|
368
368
|
letterstory admin tuning bank-score <eval-id> --version 2 # score it over the pool; prints agreement on held-out labels
|
|
369
369
|
letterstory admin tuning bank-try <eval-id> --version 2 # the judge as a trial rule in candidates, and a comparison against live
|
|
370
370
|
letterstory admin tuning invite --email editor@example.com # invite an editor (Pick and Eval bank only); `people`, `revoke <id>`
|
|
371
|
+
letterstory admin tuning assign --pick <comparison-id> --instructions "Read for the opening" # a task for every editor (--to <email> for one)
|
|
372
|
+
letterstory admin tuning assign --label bank-draft-x-not-y --target 50 # editors cut or keep 50 of this eval's sentences
|
|
371
373
|
letterstory admin tuning side-by-side <id>,<id>,<id> [--cell <key>] # several writers as one board: each one's measures against live; with --cell, every writer's text on that input
|
|
372
374
|
letterstory admin tuning candidates --kernels all --patch '{"writer":"echo/echo"}' --note "Echo" # the same change as a candidate of each kernel
|
|
373
375
|
letterstory admin tuning session-new --title "Echo round 1" --kernel Hazel --input-file brief.md --kind outline [--version 22] [--versions 23,29] # --versions: saved candidates, a trial each
|
package/lib/cli.mjs
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
} from "./commands.mjs";
|
|
57
57
|
|
|
58
58
|
// Keep in sync with cli/package.json.
|
|
59
|
-
export const VERSION = "0.
|
|
59
|
+
export const VERSION = "0.73.0";
|
|
60
60
|
|
|
61
61
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
62
62
|
// can't accidentally swallow the id as --json's value.
|
package/lib/commands/admin.mjs
CHANGED
|
@@ -473,6 +473,8 @@ async function cmdAdminTuningContext(ctx) {
|
|
|
473
473
|
* admin tuning bank-score <eval-id> --version N score a judge version over the pool (call again for more than 600)
|
|
474
474
|
* admin tuning bank-try <eval-id> --version N [--kernels Hazel,Aspen] the judge as a trial rule in candidates, and a comparison against live
|
|
475
475
|
* admin tuning people | invite --email e [--note "…"] | revoke <id> who an admin invited into the console as an editor
|
|
476
|
+
* admin tuning assignments | assign --pick <comparison-id>|--label <eval-id> [--to e] [--instructions "…"] [--target N] | unassign <id> what editors are asked to do
|
|
477
|
+
* admin tuning tasks your own open tasks, with progress
|
|
476
478
|
* admin tuning side-by-side <id>,<id>[,…] [--cell <key>] several comparisons as one board: each writer's measures against live, and one input's texts
|
|
477
479
|
* admin tuning candidates --kernels Hazel,Aspen|all --patch '{…}' [--base N] [--note "…"] the same changes as a candidate of each kernel
|
|
478
480
|
* admin tuning promote <experiment-id> --versions <service-kernel-id>:<version>,… promote from a "ship" decision
|
|
@@ -1187,6 +1189,48 @@ async function cmdAdminTuning(ctx) {
|
|
|
1187
1189
|
`${ctx.client.url}/superadmin/tuning?${new URLSearchParams({ tab: "compare", comparison: r.comparison_id })}`
|
|
1188
1190
|
);
|
|
1189
1191
|
}
|
|
1192
|
+
case "assignments": {
|
|
1193
|
+
const r = await staffRequest(ctx, "GET", `${T}/assignments${flagBool(flags.closed) ? "?closed=1" : ""}`);
|
|
1194
|
+
if (json) return printResult(io, flags, r);
|
|
1195
|
+
for (const a of r.assignments)
|
|
1196
|
+
io.log(
|
|
1197
|
+
`${a.id} ${a.kind} "${a.title}" → ${a.assignee_email ?? "every editor"}${a.target ? `, ${a.target} asked` : ""}${a.closed_at ? " (closed)" : ""}`
|
|
1198
|
+
);
|
|
1199
|
+
return;
|
|
1200
|
+
}
|
|
1201
|
+
case "assign": {
|
|
1202
|
+
const pick = flagStr(flags.pick);
|
|
1203
|
+
const label = flagStr(flags.label);
|
|
1204
|
+
if (!pick === !label)
|
|
1205
|
+
throw new CliError(
|
|
1206
|
+
'Usage: admin tuning assign --pick <comparison-id> | --label <eval-id> [--to email] [--instructions "…"] [--title "…"] [--target N]'
|
|
1207
|
+
);
|
|
1208
|
+
const body = compact({
|
|
1209
|
+
...(pick ? { kind: "pick", comparison_id: pick } : { kind: "label", eval_id: label }),
|
|
1210
|
+
assignee_email: flagStr(flags.to),
|
|
1211
|
+
instructions: flagStr(flags.instructions),
|
|
1212
|
+
title: flagStr(flags.title),
|
|
1213
|
+
target: flagNum(flags.target),
|
|
1214
|
+
});
|
|
1215
|
+
const r = await staffRequest(ctx, "POST", `${T}/assignments`, body);
|
|
1216
|
+
if (json) return printResult(io, flags, r);
|
|
1217
|
+
return io.log(
|
|
1218
|
+
`assigned ${r.assignment.kind} task "${r.assignment.title}" to ${r.assignment.assignee_email ?? "every editor"} (${r.assignment.id})`
|
|
1219
|
+
);
|
|
1220
|
+
}
|
|
1221
|
+
case "unassign": {
|
|
1222
|
+
if (!id) throw new CliError("Usage: admin tuning unassign <assignment-id>");
|
|
1223
|
+
return printResult(io, flags, await staffRequest(ctx, "DELETE", `${T}/assignments/${id}`));
|
|
1224
|
+
}
|
|
1225
|
+
case "tasks": {
|
|
1226
|
+
const r = await staffRequest(ctx, "GET", `${T}/editor/tasks`);
|
|
1227
|
+
if (json) return printResult(io, flags, r);
|
|
1228
|
+
for (const t of r.tasks)
|
|
1229
|
+
io.log(
|
|
1230
|
+
`${t.id} ${t.kind} "${t.title}": ${t.done} done, ${t.remaining} left${t.complete ? " (complete)" : ""}`
|
|
1231
|
+
);
|
|
1232
|
+
return;
|
|
1233
|
+
}
|
|
1190
1234
|
case "people": {
|
|
1191
1235
|
const r = await staffRequest(ctx, "GET", `${T}/people`);
|
|
1192
1236
|
if (json) return printResult(io, flags, r);
|
|
@@ -2144,7 +2188,7 @@ async function cmdAdminTuning(ctx) {
|
|
|
2144
2188
|
}
|
|
2145
2189
|
default:
|
|
2146
2190
|
throw new CliError(
|
|
2147
|
-
"Usage: admin tuning kernels|kernel|candidate|compare|comparisons|comparison|picks|pick|loop|ledger|evals|eval-add|eval-set|proposals|propose-eval|capture-eval|reject-eval|reading-list|finalists|finalists-queue|pair|bank|bank-eval|bank-draft|bank-shape|bank-pool|bank-judge|bank-score|bank-try|people|invite|revoke|side-by-side|candidates|base-kernels|base-versions|sessions|session|session-new|propose|trial-add|trial-run|trial-save|promote|arenas|arena|arena-candidate|arena-dials|comparison-extend|research-compare|research-inputs|research-split|research-standing|promote-arena|shred-compare|shred-inputs|shred-split|shred-standing|shredders|shredder|shredder-candidate|promote-shredder|enhance-compare|enhance-inputs|enhance-split|enhance-standing|enhancers|enhancer|enhancer-candidate|promote-enhancer (see --help)"
|
|
2191
|
+
"Usage: admin tuning kernels|kernel|candidate|compare|comparisons|comparison|picks|pick|loop|ledger|evals|eval-add|eval-set|proposals|propose-eval|capture-eval|reject-eval|reading-list|finalists|finalists-queue|pair|bank|bank-eval|bank-draft|bank-shape|bank-pool|bank-judge|bank-score|bank-try|people|invite|revoke|assignments|assign|unassign|tasks|side-by-side|candidates|base-kernels|base-versions|sessions|session|session-new|propose|trial-add|trial-run|trial-save|promote|arenas|arena|arena-candidate|arena-dials|comparison-extend|research-compare|research-inputs|research-split|research-standing|promote-arena|shred-compare|shred-inputs|shred-split|shred-standing|shredders|shredder|shredder-candidate|promote-shredder|enhance-compare|enhance-inputs|enhance-split|enhance-standing|enhancers|enhancer|enhancer-candidate|promote-enhancer (see --help)"
|
|
2148
2192
|
);
|
|
2149
2193
|
}
|
|
2150
2194
|
}
|