@letterstory/cli 0.29.4 → 0.30.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 +5 -1
- package/lib/commands/lede.mjs +25 -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.30.1";
|
|
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,13 +560,17 @@ 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
|
|
573
|
+
lede history [<domain>] [--days <n>] [--limit <n>] Openers already sent to an account
|
|
570
574
|
lede balance Ledes left on this org
|
|
571
575
|
|
|
572
576
|
Landings (a link + context; auto-mentioned in articles by collections you enable):
|
package/lib/commands/lede.mjs
CHANGED
|
@@ -51,15 +51,26 @@ export const ARGS = {
|
|
|
51
51
|
notes: "notes",
|
|
52
52
|
max_candidates: { flag: "candidates", type: "num" },
|
|
53
53
|
tone: { flag: "tone", enum: ["warm", "direct", "playful", "formal"] },
|
|
54
|
+
// How picky to be, in bits of distinctiveness. Below the floor is a free no_match.
|
|
55
|
+
distinctiveness_floor: { flag: "floor", type: "num" },
|
|
54
56
|
// Your own fallback line, returned (unbilled, still no_match) when nothing qualifies.
|
|
55
57
|
default_lede: { flag: "default-lede" },
|
|
56
58
|
// Enrichment is ON by default server-side; `--no-enrich` skips it for latency.
|
|
57
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" },
|
|
58
62
|
},
|
|
59
63
|
list_lede_runs: {
|
|
60
64
|
endpoint_id: "endpoint",
|
|
61
65
|
limit: { flag: "limit", type: "num" },
|
|
62
66
|
},
|
|
67
|
+
// What has already been said to an account, so the next send does not repeat it.
|
|
68
|
+
lede_account_history: {
|
|
69
|
+
domain: { positional: 0, label: "domain" },
|
|
70
|
+
endpoint_id: "endpoint",
|
|
71
|
+
days: { flag: "days", type: "num" },
|
|
72
|
+
limit: { flag: "limit", type: "num" },
|
|
73
|
+
},
|
|
63
74
|
list_lede_endpoints: {},
|
|
64
75
|
get_lede_balance: {},
|
|
65
76
|
create_lede_endpoint: {
|
|
@@ -99,11 +110,14 @@ export async function cmdLede(ctx) {
|
|
|
99
110
|
case "runs":
|
|
100
111
|
case "telemetry":
|
|
101
112
|
return ledeRuns(rest);
|
|
113
|
+
case "history":
|
|
114
|
+
case "sent":
|
|
115
|
+
return ledeHistory(rest);
|
|
102
116
|
case "balance":
|
|
103
117
|
return ledeBalance(rest);
|
|
104
118
|
default:
|
|
105
119
|
throw new CliError(
|
|
106
|
-
`Unknown lede subcommand: ${sub ?? "(none)"}. Try: list, create, delete, endpoint, run, runs, balance`
|
|
120
|
+
`Unknown lede subcommand: ${sub ?? "(none)"}. Try: list, create, delete, endpoint, run, runs, history, balance`
|
|
107
121
|
);
|
|
108
122
|
}
|
|
109
123
|
}
|
|
@@ -217,6 +231,16 @@ async function ledeRuns(ctx) {
|
|
|
217
231
|
return 0;
|
|
218
232
|
}
|
|
219
233
|
|
|
234
|
+
// `lede history acme.com` — what has already been said to that account, so the next
|
|
235
|
+
// send does not repeat it. Omit the domain for a picture across every account.
|
|
236
|
+
async function ledeHistory(ctx) {
|
|
237
|
+
const { client, flags, io, positionals } = ctx;
|
|
238
|
+
const args = argsFromFlags(ARGS.lede_account_history, flags, positionals);
|
|
239
|
+
const result = await client.callTool("lede_account_history", args);
|
|
240
|
+
printResult(io, flags, result);
|
|
241
|
+
return 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
220
244
|
async function ledeBalance(ctx) {
|
|
221
245
|
const { client, flags, io } = ctx;
|
|
222
246
|
const result = await client.callTool("get_lede_balance", argsFromFlags(ARGS.get_lede_balance, flags));
|