@letterstory/cli 0.30.0 → 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 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.30.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.
@@ -560,14 +560,18 @@ Ledes (opening lines for cold email, chosen per prospect from a hand-approved li
560
560
  [--company <c>] [--company-url <url>] [--school <s>] [--city <c>] [--country <c>]
561
561
  [--years <n>] [--linkedin <url>] [--notes <text>]
562
562
  [--candidates <1..10>] [--tone warm|direct|playful|formal] [--no-enrich]
563
+ [--deadline-ms <2000..120000>]
563
564
  Synchronous: prints the candidate lines with the
564
565
  top choice flagged. Needs at least one of
565
566
  --first-name, --name, --email, --company or
566
567
  --company-url. Only a match consumes a lede;
567
568
  no_match is free. --no-enrich skips the company
568
569
  lookup when latency matters more than fit.
570
+ --deadline-ms leaves out evidence that cannot
571
+ arrive in time (fewer lines may qualify).
569
572
  lede runs [--endpoint <id>] [--limit <n>] Recent lede calls (telemetry), newest first
570
573
  lede history [<domain>] [--days <n>] [--limit <n>] Openers already sent to an account
574
+ lede evals [--sweep] Lede quality evals still above zero
571
575
  lede balance Ledes left on this org
572
576
 
573
577
  Landings (a link + context; auto-mentioned in articles by collections you enable):
@@ -57,11 +57,17 @@ export const ARGS = {
57
57
  default_lede: { flag: "default-lede" },
58
58
  // Enrichment is ON by default server-side; `--no-enrich` skips it for latency.
59
59
  enrich: { value: (flags) => (flags["no-enrich"] === true ? false : undefined) },
60
+ // A latency budget: optional evidence that cannot arrive in time is left out.
61
+ deadline_ms: { flag: "deadline-ms", type: "num" },
60
62
  },
61
63
  list_lede_runs: {
62
64
  endpoint_id: "endpoint",
63
65
  limit: { flag: "limit", type: "num" },
64
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
+ },
65
71
  // What has already been said to an account, so the next send does not repeat it.
66
72
  lede_account_history: {
67
73
  domain: { positional: 0, label: "domain" },
@@ -111,11 +117,14 @@ export async function cmdLede(ctx) {
111
117
  case "history":
112
118
  case "sent":
113
119
  return ledeHistory(rest);
120
+ case "evals":
121
+ case "briefing":
122
+ return ledeEvals(rest);
114
123
  case "balance":
115
124
  return ledeBalance(rest);
116
125
  default:
117
126
  throw new CliError(
118
- `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`
119
128
  );
120
129
  }
121
130
  }
@@ -239,6 +248,15 @@ async function ledeHistory(ctx) {
239
248
  return 0;
240
249
  }
241
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
+
242
260
  async function ledeBalance(ctx) {
243
261
  const { client, flags, io } = ctx;
244
262
  const result = await client.callTool("get_lede_balance", argsFromFlags(ARGS.get_lede_balance, flags));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Spin up and manage Letterstory phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",