@letterstory/cli 0.30.1 → 0.31.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/lib/cli.mjs +2 -1
- package/lib/commands/lede.mjs +17 -1
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
} from "./commands.mjs";
|
|
45
45
|
|
|
46
46
|
// Keep in sync with cli/package.json.
|
|
47
|
-
export const VERSION = "0.
|
|
47
|
+
export const VERSION = "0.31.0";
|
|
48
48
|
|
|
49
49
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
50
50
|
// can't accidentally swallow the id as --json's value.
|
|
@@ -571,6 +571,7 @@ Ledes (opening lines for cold email, chosen per prospect from a hand-approved li
|
|
|
571
571
|
arrive in time (fewer lines may qualify).
|
|
572
572
|
lede runs [--endpoint <id>] [--limit <n>] Recent lede calls (telemetry), newest first
|
|
573
573
|
lede history [<domain>] [--days <n>] [--limit <n>] Openers already sent to an account
|
|
574
|
+
lede evals [--sweep] Lede quality evals still above zero
|
|
574
575
|
lede balance Ledes left on this org
|
|
575
576
|
|
|
576
577
|
Landings (a link + context; auto-mentioned in articles by collections you enable):
|
package/lib/commands/lede.mjs
CHANGED
|
@@ -64,6 +64,10 @@ export const ARGS = {
|
|
|
64
64
|
endpoint_id: "endpoint",
|
|
65
65
|
limit: { flag: "limit", type: "num" },
|
|
66
66
|
},
|
|
67
|
+
// The state of the quality exercise: which evals still count above zero.
|
|
68
|
+
lede_eval_briefing: {
|
|
69
|
+
sweep: { value: (flags) => (flags.sweep === true ? true : undefined) },
|
|
70
|
+
},
|
|
67
71
|
// What has already been said to an account, so the next send does not repeat it.
|
|
68
72
|
lede_account_history: {
|
|
69
73
|
domain: { positional: 0, label: "domain" },
|
|
@@ -113,11 +117,14 @@ export async function cmdLede(ctx) {
|
|
|
113
117
|
case "history":
|
|
114
118
|
case "sent":
|
|
115
119
|
return ledeHistory(rest);
|
|
120
|
+
case "evals":
|
|
121
|
+
case "briefing":
|
|
122
|
+
return ledeEvals(rest);
|
|
116
123
|
case "balance":
|
|
117
124
|
return ledeBalance(rest);
|
|
118
125
|
default:
|
|
119
126
|
throw new CliError(
|
|
120
|
-
`Unknown lede subcommand: ${sub ?? "(none)"}. Try: list, create, delete, endpoint, run, runs, history, balance`
|
|
127
|
+
`Unknown lede subcommand: ${sub ?? "(none)"}. Try: list, create, delete, endpoint, run, runs, history, evals, balance`
|
|
121
128
|
);
|
|
122
129
|
}
|
|
123
130
|
}
|
|
@@ -241,6 +248,15 @@ async function ledeHistory(ctx) {
|
|
|
241
248
|
return 0;
|
|
242
249
|
}
|
|
243
250
|
|
|
251
|
+
// `lede evals [--sweep]` — which categories of false positive still count above zero.
|
|
252
|
+
// The exercise is finished when total_hits reads zero and no new flags are arriving.
|
|
253
|
+
async function ledeEvals(ctx) {
|
|
254
|
+
const { client, flags, io } = ctx;
|
|
255
|
+
const result = await client.callTool("lede_eval_briefing", argsFromFlags(ARGS.lede_eval_briefing, flags));
|
|
256
|
+
printResult(io, flags, result);
|
|
257
|
+
return 0;
|
|
258
|
+
}
|
|
259
|
+
|
|
244
260
|
async function ledeBalance(ctx) {
|
|
245
261
|
const { client, flags, io } = ctx;
|
|
246
262
|
const result = await client.callTool("get_lede_balance", argsFromFlags(ARGS.get_lede_balance, flags));
|