@letterstory/cli 0.103.0 → 0.103.2

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 CHANGED
@@ -441,6 +441,7 @@ letterstory admin crm capture thread.png --context "this is for tryordinal.com"
441
441
  # a screenshot → a lead: what it read, which account
442
442
  letterstory admin crm capture thread.png --context "this is for tryordinal.com" # …and for real
443
443
  letterstory admin crm capture --text-file notes.txt # pasted text or notes work the same way
444
+ letterstory admin crm capture thread.png --retry # sent before, some entries didn't save: write only what's missing
444
445
 
445
446
  # One-click onboarding of a won client (key needs crm:write + fleet:onboard + org:create)
446
447
  letterstory admin crm onboard <account-id> --domain acme.com \
package/lib/cli.mjs CHANGED
@@ -60,7 +60,7 @@ import {
60
60
  } from "./commands.mjs";
61
61
 
62
62
  // Keep in sync with cli/package.json.
63
- export const VERSION = "0.103.0";
63
+ export const VERSION = "0.103.2";
64
64
 
65
65
  // Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
66
66
  // can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
@@ -773,7 +773,7 @@ Admin (STAFF key — --staff-key / LETTERSTORY_STAFF_API_KEY; acts before an org
773
773
  Needs spend:read (reads) / spend:write (writes).
774
774
  admin crm import <file.csv> [--source <name>] [--tag "…"] [--dry-run]
775
775
  | capture [shot.png …] [--text "…" | --text-file f] [--context "this is for acme.com"]
776
- [--account <id>] [--dry-run] screenshots / a thread / a note → a lead
776
+ [--account <id>] [--dry-run] [--retry] screenshots / a thread / a note → a lead
777
777
  | signals [--status new] [--intent qualified] [--source rb2b] [--account <id>]
778
778
  | record --title "…" [--source bookface] [--kind other] [--intent qualified]
779
779
  [--name …] [--email …] [--company …] [--domain …] [--linkedin …] [--detail …]
@@ -2777,7 +2777,7 @@ const CRM_CAPTURE_TYPES = {
2777
2777
  async function cmdAdminCrmCapture(ctx, paths) {
2778
2778
  const { flags, io } = ctx;
2779
2779
  const usage =
2780
- 'Usage: admin crm capture [image.png …] [--text "…" | --text-file notes.txt] [--context "this is for acme.com"] [--account <id>] [--dry-run]';
2780
+ 'Usage: admin crm capture [image.png …] [--text "…" | --text-file notes.txt] [--context "this is for acme.com"] [--account <id>] [--dry-run] [--retry]';
2781
2781
  const images = paths.map((path) => {
2782
2782
  const media_type = CRM_CAPTURE_TYPES[path.split(".").pop()?.toLowerCase() ?? ""];
2783
2783
  if (!media_type) throw new CliError(`${path}: only png, jpg, gif and webp screenshots can be read`);
@@ -2807,6 +2807,8 @@ async function cmdAdminCrmCapture(ctx, paths) {
2807
2807
  account_id: flagStr(flags.account),
2808
2808
  source: flagStr(flags.source) ?? "agent",
2809
2809
  dry_run: flagBool(flags["dry-run"]) || undefined,
2810
+ // Sent before but some entries didn't save: read it again, writing only what isn't in.
2811
+ retry: flagBool(flags.retry) || undefined,
2810
2812
  })
2811
2813
  );
2812
2814
  if (flagBool(flags.json)) return printResult(io, flags, r);
@@ -2835,7 +2837,9 @@ export function captureSummary(r) {
2835
2837
  if (r.batch) {
2836
2838
  const width = Math.max(...r.batch.map((b) => (BATCH_STATUS[b.status] ?? b.status).length), 0);
2837
2839
  return [
2838
- `${r.dryRun ? "would save" : "saved"} ${r.accountName ?? `${r.batch.length} entries`}`,
2840
+ r.duplicate
2841
+ ? `sent before: ${r.accountName ?? `${r.batch.length} already in`}`
2842
+ : `${r.dryRun ? "would save" : "saved"} ${r.accountName ?? `${r.batch.length} entries`}`,
2839
2843
  ...r.batch.map((b) => {
2840
2844
  const status = (BATCH_STATUS[b.status] ?? b.status).padEnd(width);
2841
2845
  const where = b.accountName ?? b.companyName ?? "?";
@@ -2847,12 +2851,13 @@ export function captureSummary(r) {
2847
2851
  }),
2848
2852
  ];
2849
2853
  }
2850
- const verb = r.dryRun
2851
- ? r.accountId
2852
- ? "would add to"
2853
- : "would create"
2854
- : r.duplicate
2855
- ? "already captured →"
2854
+ // A preview says "sent before" too (the app checks before it reads), so that comes first.
2855
+ const verb = r.duplicate
2856
+ ? "already captured →"
2857
+ : r.dryRun
2858
+ ? r.accountId
2859
+ ? "would add to"
2860
+ : "would create"
2856
2861
  : r.accountCreated
2857
2862
  ? "created"
2858
2863
  : "added to";
@@ -2876,7 +2881,7 @@ export function captureSummary(r) {
2876
2881
  * outreach add "Jane Doe" [--company …] [--owner …] [--channel x] [--relationship …]
2877
2882
  * [--ask …] [--linkedin …] [--email …] [--lookup]
2878
2883
  * outreach lookup "Jane Doe from Acme" [shot.png …] prefilled from the web; writes nothing
2879
- * outreach relookup [--missing linkedin] the web lookup again for whoever lacks it
2884
+ * outreach relookup [--missing linkedin|company|location|any] the web lookup again for whoever lacks it
2880
2885
  * outreach drafts [--kind ask|thanks] [--owner …] drafts or thank-yous for everyone without one
2881
2886
  * outreach engagement --outcome upvoted [shot.png] who upvoted, matched by exact name
2882
2887
  * outreach customers [--dry-run] every customer's primary contact onto the list
@@ -2949,6 +2954,7 @@ async function cmdAdminCrmOutreach(ctx, args) {
2949
2954
  for (const p of r.created) io.log(`added ${line(p)}`);
2950
2955
  for (const d of r.duplicates)
2951
2956
  io.log(`already on the list: ${d.existingName} (matched on ${d.matchedOn}) ${d.existingId}`);
2957
+ for (const x of r.skipped ?? []) io.log(`not added: ${x.name} (${x.reason})`);
2952
2958
  return;
2953
2959
  }
2954
2960
  case "lookup": {
@@ -2999,7 +3005,7 @@ async function cmdAdminCrmOutreach(ctx, args) {
2999
3005
  return json ? printResult(io, flags, r) : io.log(line(r));
3000
3006
  }
3001
3007
  case "relookup": {
3002
- // admin crm outreach relookup [--missing linkedin|company|any] — the web lookup again,
3008
+ // admin crm outreach relookup [--missing linkedin|company|location|any] — the web lookup again,
3003
3009
  // filling only blanks, calling until none remain (a dozen people per call).
3004
3010
  const missing = flagStr(flags.missing) ?? "linkedin";
3005
3011
  let total = 0;
@@ -3081,9 +3087,12 @@ async function cmdAdminCrmOutreach(ctx, args) {
3081
3087
  );
3082
3088
  if (json) return printResult(io, flags, r);
3083
3089
  return io.log(
3084
- r.dryRun
3090
+ (r.dryRun
3085
3091
  ? `would add up to ${r.candidates.length}: ${r.candidates.join(", ")}`
3086
- : `added ${r.created.length}; already on the list: ${r.duplicates.length}`
3092
+ : `added ${r.created.length}; already on the list: ${r.duplicates.length}`) +
3093
+ (r.skipped?.length
3094
+ ? `\nnot added (on the no-contact list): ${r.skipped.map((x) => x.name).join(", ")}`
3095
+ : "")
3087
3096
  );
3088
3097
  }
3089
3098
  case "catch-up": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.103.0",
3
+ "version": "0.103.2",
4
4
  "description": "Spin up and manage Letterstory phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",