@letterstory/cli 0.29.4 → 0.30.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 +23 -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.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.
|
|
@@ -567,6 +567,7 @@ Ledes (opening lines for cold email, chosen per prospect from a hand-approved li
|
|
|
567
567
|
no_match is free. --no-enrich skips the company
|
|
568
568
|
lookup when latency matters more than fit.
|
|
569
569
|
lede runs [--endpoint <id>] [--limit <n>] Recent lede calls (telemetry), newest first
|
|
570
|
+
lede history [<domain>] [--days <n>] [--limit <n>] Openers already sent to an account
|
|
570
571
|
lede balance Ledes left on this org
|
|
571
572
|
|
|
572
573
|
Landings (a link + context; auto-mentioned in articles by collections you enable):
|
package/lib/commands/lede.mjs
CHANGED
|
@@ -51,6 +51,8 @@ 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.
|
|
@@ -60,6 +62,13 @@ export const ARGS = {
|
|
|
60
62
|
endpoint_id: "endpoint",
|
|
61
63
|
limit: { flag: "limit", type: "num" },
|
|
62
64
|
},
|
|
65
|
+
// What has already been said to an account, so the next send does not repeat it.
|
|
66
|
+
lede_account_history: {
|
|
67
|
+
domain: { positional: 0, label: "domain" },
|
|
68
|
+
endpoint_id: "endpoint",
|
|
69
|
+
days: { flag: "days", type: "num" },
|
|
70
|
+
limit: { flag: "limit", type: "num" },
|
|
71
|
+
},
|
|
63
72
|
list_lede_endpoints: {},
|
|
64
73
|
get_lede_balance: {},
|
|
65
74
|
create_lede_endpoint: {
|
|
@@ -99,11 +108,14 @@ export async function cmdLede(ctx) {
|
|
|
99
108
|
case "runs":
|
|
100
109
|
case "telemetry":
|
|
101
110
|
return ledeRuns(rest);
|
|
111
|
+
case "history":
|
|
112
|
+
case "sent":
|
|
113
|
+
return ledeHistory(rest);
|
|
102
114
|
case "balance":
|
|
103
115
|
return ledeBalance(rest);
|
|
104
116
|
default:
|
|
105
117
|
throw new CliError(
|
|
106
|
-
`Unknown lede subcommand: ${sub ?? "(none)"}. Try: list, create, delete, endpoint, run, runs, balance`
|
|
118
|
+
`Unknown lede subcommand: ${sub ?? "(none)"}. Try: list, create, delete, endpoint, run, runs, history, balance`
|
|
107
119
|
);
|
|
108
120
|
}
|
|
109
121
|
}
|
|
@@ -217,6 +229,16 @@ async function ledeRuns(ctx) {
|
|
|
217
229
|
return 0;
|
|
218
230
|
}
|
|
219
231
|
|
|
232
|
+
// `lede history acme.com` — what has already been said to that account, so the next
|
|
233
|
+
// send does not repeat it. Omit the domain for a picture across every account.
|
|
234
|
+
async function ledeHistory(ctx) {
|
|
235
|
+
const { client, flags, io, positionals } = ctx;
|
|
236
|
+
const args = argsFromFlags(ARGS.lede_account_history, flags, positionals);
|
|
237
|
+
const result = await client.callTool("lede_account_history", args);
|
|
238
|
+
printResult(io, flags, result);
|
|
239
|
+
return 0;
|
|
240
|
+
}
|
|
241
|
+
|
|
220
242
|
async function ledeBalance(ctx) {
|
|
221
243
|
const { client, flags, io } = ctx;
|
|
222
244
|
const result = await client.callTool("get_lede_balance", argsFromFlags(ARGS.get_lede_balance, flags));
|