sproutkit-code 1.17.0 → 1.17.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.
Files changed (2) hide show
  1. package/dist/index.js +29 -19
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -98534,6 +98534,34 @@ Want it live on your own domain?`;
98534
98534
  let harvested = 0;
98535
98535
  for (const r of eligible) {
98536
98536
  const isBookingLead = r.lead_kind === "no_booking";
98537
+ const e164 = toE164(r.phone ?? "");
98538
+ if (!r.email && smtp && (preferEmail || !e164)) {
98539
+ ctx.emitProgress?.({
98540
+ channel: "outreach:progress",
98541
+ payload: { msg: `Looking up an email for ${r.name}\u2026` }
98542
+ });
98543
+ const found = await (0, email_harvest_1.harvestEmail)({
98544
+ name: r.name,
98545
+ address: r.address ?? "",
98546
+ city: r.city ?? "",
98547
+ apiKey: getDecryptedSetting("anthropic_key")
98548
+ });
98549
+ if (found) {
98550
+ db2.run("UPDATE leads SET email = ? WHERE id = ?", [found, r.id]);
98551
+ r.email = found;
98552
+ harvested++;
98553
+ }
98554
+ }
98555
+ if (!(smtp && r.email && (preferEmail || !e164)) && !(e164 && linkChannel)) {
98556
+ prepared.push({
98557
+ id: r.id,
98558
+ name: r.name,
98559
+ via: "none",
98560
+ email: r.email ?? void 0,
98561
+ message: ""
98562
+ });
98563
+ continue;
98564
+ }
98537
98565
  let videoUrl = r.pitch_video_url ?? null;
98538
98566
  if (!isBookingLead && !videoUrl && r.site_url && getDecryptedSetting("pitch_auto") === "1") {
98539
98567
  ctx.emitProgress?.({ channel: "outreach:progress", payload: { msg: `Recording a video for ${r.name}\u2026` } });
@@ -98556,24 +98584,6 @@ Want it live on your own domain?`;
98556
98584
  }
98557
98585
  }
98558
98586
  const message = (0, pitch_text_1.withVideo)((0, pitch_text_1.withReceptionist)((isBookingLead ? bookingTemplate : template).replace(/\{name\}/g, r.name).replace(/\{site_url\}/g, (isBookingLead ? r.booking_url : r.site_url) ?? r.site_url ?? "").replace(/\{booking_how\}/g, r.booking_platform || "WhatsApp/phone"), isBookingLead ? null : receptionistUrl, isBookingLead ? null : receptionistLine, r.name, !!r.front_desk_chat), isBookingLead ? null : videoUrl);
98559
- const e164 = toE164(r.phone ?? "");
98560
- if (!r.email && smtp && (preferEmail || !e164)) {
98561
- ctx.emitProgress?.({
98562
- channel: "outreach:progress",
98563
- payload: { msg: `Looking up an email for ${r.name}\u2026` }
98564
- });
98565
- const found = await (0, email_harvest_1.harvestEmail)({
98566
- name: r.name,
98567
- address: r.address ?? "",
98568
- city: r.city ?? "",
98569
- apiKey: getDecryptedSetting("anthropic_key")
98570
- });
98571
- if (found) {
98572
- db2.run("UPDATE leads SET email = ? WHERE id = ?", [found, r.id]);
98573
- r.email = found;
98574
- harvested++;
98575
- }
98576
- }
98577
98587
  if (r.email && (0, guardrails_1.isSuppressed)(r.email)) {
98578
98588
  prepared.push({ id: r.id, name: r.name, via: "none", email: r.email, message, emailError: "On the do-not-contact list" });
98579
98589
  continue;
@@ -100566,7 +100576,7 @@ var require_package2 = __commonJS({
100566
100576
  "package.json"(exports2, module2) {
100567
100577
  module2.exports = {
100568
100578
  name: "sproutkit-code",
100569
- version: "1.17.0",
100579
+ version: "1.17.1",
100570
100580
  description: "Sproutkit in your terminal \u2014 find leads, build sites, run outreach, all via chat.",
100571
100581
  bin: {
100572
100582
  sproutkit: "./dist/index.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sproutkit-code",
3
- "version": "1.17.0",
3
+ "version": "1.17.1",
4
4
  "description": "Sproutkit in your terminal — find leads, build sites, run outreach, all via chat.",
5
5
  "bin": {
6
6
  "sproutkit": "./dist/index.js"