outbound-sdk 0.10.0 → 0.12.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.
Files changed (85) hide show
  1. package/dist/alerts/index.js +1 -1
  2. package/dist/cards/index.js +201 -92
  3. package/dist/cards/sender-tool-cards.d.ts +6 -0
  4. package/dist/chunks/{chunk-MEEJIIIA.js → chunk-2ADIGC2N.js} +77 -8
  5. package/dist/chunks/{chunk-NAYVG7SI.js → chunk-3DDYXUDG.js} +1 -1
  6. package/dist/chunks/{chunk-UAHYPASH.js → chunk-3LRIWQEJ.js} +2 -1
  7. package/dist/chunks/{chunk-UZLFZZ2U.js → chunk-AWNH4I5D.js} +11 -2
  8. package/dist/chunks/{chunk-A7DLJUA6.js → chunk-B72F56HF.js} +3 -1
  9. package/dist/chunks/{chunk-KMQHXFIZ.js → chunk-CTRYCW4G.js} +648 -182
  10. package/dist/chunks/{chunk-OVTYA3IB.js → chunk-HDTOGEVN.js} +532 -182
  11. package/dist/chunks/{chunk-POBAY3TI.js → chunk-HXCZMMSD.js} +21 -0
  12. package/dist/chunks/chunk-I7GBBHD2.js +80 -0
  13. package/dist/chunks/{chunk-FTK4JS65.js → chunk-KNWJIJVO.js} +73 -4
  14. package/dist/chunks/{chunk-UOJG4VYF.js → chunk-LD5OAELW.js} +1 -1
  15. package/dist/chunks/{chunk-YFJ3OQZS.js → chunk-OPLXELPS.js} +5 -1
  16. package/dist/chunks/{chunk-KQCIF5IT.js → chunk-UIINRLHQ.js} +23 -9
  17. package/dist/chunks/{chunk-OMCDMELK.js → chunk-UWNQEQIX.js} +1 -1
  18. package/dist/chunks/{chunk-MPE6VLLY.js → chunk-UZ4YWUZ7.js} +1 -1
  19. package/dist/chunks/{tools-AVJ3XJ5A.js → tools-EKLZKXZU.js} +5 -4
  20. package/dist/cli/bin.js +11 -10
  21. package/dist/cli/config.d.ts +2 -0
  22. package/dist/cli/index.js +10 -9
  23. package/dist/combine/index.js +36 -2
  24. package/dist/emailbison/index.js +4 -4
  25. package/dist/fixtures/index.js +4 -4
  26. package/dist/heyreach/index.js +14 -6
  27. package/dist/identity/index.js +46 -11
  28. package/dist/identity/keys.d.ts +1 -1
  29. package/dist/index.js +8 -6
  30. package/dist/insights/define.d.ts +1 -1
  31. package/dist/insights/index.js +5 -4
  32. package/dist/insights/inputs.generated.d.ts +68 -5
  33. package/dist/insights/ops/channel-mix.d.ts +8 -1
  34. package/dist/insights/ops/period-comparison.d.ts +13 -2
  35. package/dist/insights/ops/shared.d.ts +11 -1
  36. package/dist/insights/ops/tag-rollup.d.ts +8 -1
  37. package/dist/insights/people/dropped-replies-check.d.ts +14 -2
  38. package/dist/insights/people/find.d.ts +5 -4
  39. package/dist/insights/people/hot-leads.d.ts +10 -1
  40. package/dist/insights/people/index.d.ts +26 -2
  41. package/dist/insights/people/person-summary.d.ts +15 -3
  42. package/dist/insights/people/thread-context.d.ts +79 -0
  43. package/dist/insights/people/thread-contexts.d.ts +59 -0
  44. package/dist/insights/people/thread-read.d.ts +22 -0
  45. package/dist/insights/registry.d.ts +25 -3
  46. package/dist/insights/senders/domain-health.d.ts +1 -1
  47. package/dist/insights/senders/index.d.ts +1 -1
  48. package/dist/insights/senders/read.d.ts +9 -0
  49. package/dist/instantly/adapter.d.ts +3 -2
  50. package/dist/instantly/capabilities.d.ts +5 -0
  51. package/dist/instantly/index.js +148 -45
  52. package/dist/instantly/senders.d.ts +3 -0
  53. package/dist/internal/adapter.d.ts +7 -0
  54. package/dist/internal/capabilities.d.ts +8 -0
  55. package/dist/internal/entities.d.ts +20 -0
  56. package/dist/internal/fields.d.ts +8 -0
  57. package/dist/internal/outbound/api.d.ts +12 -0
  58. package/dist/internal/outbound/operations-account.d.ts +4 -1
  59. package/dist/internal/outbound/outbound.d.ts +2 -1
  60. package/dist/internal/outbound/specs-account.d.ts +2 -1
  61. package/dist/internal/person.d.ts +32 -0
  62. package/dist/internal/records.d.ts +2 -2
  63. package/dist/internal/url.d.ts +2 -1
  64. package/dist/loader/index.js +1 -1
  65. package/dist/memory/data.d.ts +2 -1
  66. package/dist/memory/index.js +6 -4
  67. package/dist/redact/index.d.ts +1 -1
  68. package/dist/redact/index.js +48 -26
  69. package/dist/redact/plugin.d.ts +12 -4
  70. package/dist/redact/tokens.d.ts +21 -0
  71. package/dist/smartlead/index.js +18 -7
  72. package/dist/tools/account-tools.d.ts +0 -5
  73. package/dist/tools/ai-sdk.js +5 -3
  74. package/dist/tools/campaign-tools.d.ts +0 -4
  75. package/dist/tools/claude-agent.js +5 -3
  76. package/dist/tools/deliverability-check.d.ts +9 -0
  77. package/dist/tools/index.js +6 -4
  78. package/dist/tools/people-tools.d.ts +4 -1
  79. package/dist/tools/person-input.d.ts +17 -0
  80. package/dist/tools/sender-health.d.ts +8 -0
  81. package/dist/tools/sender-impact.d.ts +38 -0
  82. package/dist/tools/shared.d.ts +5 -0
  83. package/dist/webhooks/index.js +6 -6
  84. package/package.json +1 -1
  85. /package/dist/chunks/{chunk-5XLR6XVV.js → chunk-TOZKA7JR.js} +0 -0
@@ -76,6 +76,12 @@ var recipientMailProviderSchema = z.enum([
76
76
  "microsoft",
77
77
  "other"
78
78
  ]);
79
+ var meetingStatusSchema = z.enum([
80
+ "booked",
81
+ "completed",
82
+ "no_show",
83
+ "won"
84
+ ]);
79
85
  var senderSchema = z.object({
80
86
  ...base,
81
87
  /** Lowercased mailbox address. `null` for a LinkedIn seat. */
@@ -148,6 +154,14 @@ var leadSchema = z.object({
148
154
  interestCategory: replyCategorySchema.nullable(),
149
155
  lastName: z.string().nullable(),
150
156
  linkedinUrl: z.string().nullable(),
157
+ /**
158
+ * The meeting the vendor records for the lead, from its own status field,
159
+ * never from a label's wording. `null` when it records none. Where
160
+ * `fields.lead.meeting` is `false` the vendor records no meetings at all,
161
+ * so `null` says nothing. Optional, so a lead built or stored before the
162
+ * field existed still matches the schema.
163
+ */
164
+ meeting: meetingStatusSchema.nullable().optional(),
151
165
  /** Where the lead is, in the vendor's own words. */
152
166
  location: z.string().nullable(),
153
167
  phone: z.string().nullable(),
@@ -187,6 +201,12 @@ var messageFields = {
187
201
  stepIndex: z.number().int().nonnegative().nullable(),
188
202
  subject: z.string().nullable(),
189
203
  threadId: z.string().nullable(),
204
+ /**
205
+ * A link that opens this conversation in the vendor's app, built only from
206
+ * a URL scheme the vendor documents or that was verified live. `null` when
207
+ * the vendor has none; absent from adapters that predate it.
208
+ */
209
+ url: z.url().nullable().optional(),
190
210
  variantKey: z.string().nullable()
191
211
  };
192
212
  var autoSourceSchema = z.enum(["rule", "vendor"]);
@@ -402,6 +422,7 @@ export {
402
422
  senderStatusSchema,
403
423
  mailProviderSchema,
404
424
  recipientMailProviderSchema,
425
+ meetingStatusSchema,
405
426
  senderSchema,
406
427
  leadStatusSchema,
407
428
  leadProgressSchema,
@@ -0,0 +1,80 @@
1
+ import {
2
+ profileSlug
3
+ } from "./chunk-OPLXELPS.js";
4
+ import {
5
+ parseRef
6
+ } from "./chunk-HXB2IOJJ.js";
7
+ import {
8
+ OutboundError
9
+ } from "./chunk-XYHM4KHC.js";
10
+
11
+ // src/internal/person.ts
12
+ var EMAIL = /^[^\s@:]+@[^\s@.:]+(?:\.[^\s@.:]+)+$/u;
13
+ var DOMAIN = /^@?[^\s@/:]+(?:\.[^\s@/:.]+)+$/u;
14
+ var PROVIDER = /^[a-z][a-z0-9-]*$/u;
15
+ var SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
16
+ var PERSON_FORMS = "an email address, a LinkedIn profile URL or a lead ref as another tool returned it (provider:workspace:id)";
17
+ var bare = (identifier) => identifier.trim().replace(/^mailto:/iu, "");
18
+ var leadRefParts = (identifier) => {
19
+ const parts = parseRef(identifier.trim());
20
+ return parts !== null && PROVIDER.test(parts.provider) && !SCHEMES.has(parts.provider) ? parts : null;
21
+ };
22
+ var personKey = (identifier) => {
23
+ const value = bare(identifier);
24
+ if (leadRefParts(value) !== null) {
25
+ return null;
26
+ }
27
+ const slug = profileSlug(value);
28
+ if (slug !== null) {
29
+ return `linkedin:${slug}`;
30
+ }
31
+ return EMAIL.test(value) ? `email:${value.toLowerCase()}` : null;
32
+ };
33
+ var notAPerson = (identifier) => {
34
+ const value = bare(identifier);
35
+ if (DOMAIN.test(value)) {
36
+ return `"${value}" is a company domain, not a person. Use account_summary for a company domain`;
37
+ }
38
+ return value.includes("@") && !value.includes(":") ? `"${value}" is not a valid email address` : `"${value}" is not ${PERSON_FORMS}`;
39
+ };
40
+ var parsePerson = (identifier, provider) => {
41
+ const parts = leadRefParts(identifier);
42
+ if (parts !== null) {
43
+ return {
44
+ key: personKey(parts.sourceId),
45
+ ref: { ...parts, text: identifier.trim() }
46
+ };
47
+ }
48
+ const key = personKey(identifier);
49
+ if (key === null) {
50
+ throw new OutboundError("Invalid", notAPerson(identifier), { provider });
51
+ }
52
+ return { key, ref: null };
53
+ };
54
+ var reads = (outbound) => outbound.provider === "combined" ? "no tool on this combined instance is that one" : `this instance reads ${outbound.provider} workspace ${outbound.workspaceId}`;
55
+ var assertRefReadable = (outbound, ref) => {
56
+ if (ref.provider === outbound.provider && ref.workspaceId === outbound.workspaceId) {
57
+ return;
58
+ }
59
+ try {
60
+ outbound.workspace(`${ref.provider}:${ref.workspaceId}`);
61
+ } catch (error) {
62
+ if (OutboundError.is(error) && error.code === "NotFound") {
63
+ throw new OutboundError(
64
+ "Invalid",
65
+ `"${ref.text}" is a lead ref from ${ref.provider} workspace ${ref.workspaceId}, but ${reads(outbound)}. Ask an instance that reads ${ref.provider}, for example with --provider ${ref.provider} or --provider all, or give the person's email address or LinkedIn profile URL`,
66
+ { provider: outbound.provider }
67
+ );
68
+ }
69
+ throw error;
70
+ }
71
+ };
72
+
73
+ export {
74
+ PERSON_FORMS,
75
+ leadRefParts,
76
+ personKey,
77
+ notAPerson,
78
+ parsePerson,
79
+ assertRefReadable
80
+ };
@@ -1,3 +1,9 @@
1
+ import {
2
+ PERSON_FORMS,
3
+ leadRefParts,
4
+ notAPerson,
5
+ personKey
6
+ } from "./chunk-I7GBBHD2.js";
1
7
  import {
2
8
  computeRates
3
9
  } from "./chunk-CPACP4YD.js";
@@ -232,10 +238,66 @@ var runwayDays = (split, byStatus, complete, pace) => {
232
238
  return pace === null || pace <= 0 ? null : roundTo(left / pace);
233
239
  };
234
240
 
241
+ // src/tools/person-input.ts
242
+ import { z as z3 } from "zod";
243
+ var personFields = {
244
+ email: z3.string().optional().describe("The person's email address, for example jane@acme.com"),
245
+ lead_ref: z3.string().optional().describe(
246
+ "A lead ref exactly as another tool returned it (provider:workspace:id), for example a reply's leadRef or a lead's ref. A ref's provider picks the tool it is read from"
247
+ ),
248
+ linkedin_url: z3.string().optional().describe("The person's LinkedIn profile URL"),
249
+ person: z3.string().optional().describe(
250
+ `Any of ${PERSON_FORMS}. Give exactly one of person, lead_ref, email and linkedin_url`
251
+ )
252
+ };
253
+ var NAMES = ["lead_ref", "email", "linkedin_url", "person"];
254
+ var wrongKind = (name, value) => {
255
+ const isRef = leadRefParts(value) !== null;
256
+ const key = personKey(value);
257
+ switch (name) {
258
+ case "lead_ref": {
259
+ return isRef ? null : `takes a lead ref as another tool returned it (provider:workspace:id); ${key === null ? notAPerson(value) : `pass "${value.trim()}" as ${key.startsWith("email:") ? "email" : "linkedin_url"} instead`}`;
260
+ }
261
+ case "email": {
262
+ if (key?.startsWith("email:") === true) {
263
+ return null;
264
+ }
265
+ return isRef ? `takes an email address; "${value.trim()}" is a lead ref, so pass it as lead_ref` : `takes an email address: ${notAPerson(value)}`;
266
+ }
267
+ case "linkedin_url": {
268
+ if (key?.startsWith("linkedin:") === true) {
269
+ return null;
270
+ }
271
+ return isRef ? `takes a LinkedIn profile URL; "${value.trim()}" is a lead ref, so pass it as lead_ref` : `takes a LinkedIn profile URL, for example https://www.linkedin.com/in/jane-doe; "${value.trim()}" is not one`;
272
+ }
273
+ default: {
274
+ return isRef || key !== null ? null : notAPerson(value);
275
+ }
276
+ }
277
+ };
278
+ var checkPerson = (values, context) => {
279
+ const given = NAMES.filter((name2) => values[name2] !== void 0);
280
+ if (given.length !== 1) {
281
+ context.addIssue({
282
+ code: "custom",
283
+ message: `needs exactly one of lead_ref, email, linkedin_url or person (${PERSON_FORMS})${given.length > 1 ? `, but got ${given.join(" and ")}` : ""}`,
284
+ path: []
285
+ });
286
+ return;
287
+ }
288
+ const [name] = given;
289
+ const value = name === void 0 ? void 0 : values[name];
290
+ if (name === void 0 || value === void 0) {
291
+ return;
292
+ }
293
+ const problem = wrongKind(name, value);
294
+ if (problem !== null) {
295
+ context.addIssue({ code: "custom", message: problem, path: [name] });
296
+ }
297
+ };
298
+ var personOf = (values) => values.lead_ref ?? values.email ?? values.linkedin_url ?? values.person ?? "";
299
+
235
300
  export {
236
- SCREENED_AT_MOST,
237
- warmupAtZero,
238
- listProblemsOf,
239
301
  UNTRUSTED_NOTE,
240
302
  DEFAULT_BODY_CHARS,
241
303
  day,
@@ -251,10 +313,17 @@ export {
251
313
  namesCampaign,
252
314
  routedByCampaign,
253
315
  withCampaign,
316
+ SCREENED_AT_MOST,
317
+ brokenStatus,
318
+ warmupAtZero,
319
+ listProblemsOf,
254
320
  inputProblem,
255
321
  paceWindow,
256
322
  newLeadsPerDay,
257
323
  splitActive,
258
324
  leadsToStart,
259
- runwayDays
325
+ runwayDays,
326
+ personFields,
327
+ checkPerson,
328
+ personOf
260
329
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildUrl
3
- } from "./chunk-YFJ3OQZS.js";
3
+ } from "./chunk-OPLXELPS.js";
4
4
  import {
5
5
  stableId
6
6
  } from "./chunk-KVAG5GM2.js";
@@ -4,7 +4,11 @@ var buildUrl = (baseUrl, path, query = {}) => {
4
4
  `${baseUrl.replace(/\/+$/u, "")}/${path.replace(/^\/+/u, "")}`
5
5
  );
6
6
  for (const [key, value] of Object.entries(query)) {
7
- if (value !== void 0 && value !== null) {
7
+ if (Array.isArray(value)) {
8
+ for (const item of value) {
9
+ url.searchParams.append(key, item);
10
+ }
11
+ } else if (value !== void 0 && value !== null) {
8
12
  url.searchParams.set(key, String(value));
9
13
  }
10
14
  }
@@ -5,17 +5,17 @@ import {
5
5
  describeReplyCounts,
6
6
  leftOutReason,
7
7
  repliesByPerson
8
- } from "./chunk-OVTYA3IB.js";
8
+ } from "./chunk-HDTOGEVN.js";
9
9
  import {
10
10
  resolveCampaign,
11
11
  resolveList
12
- } from "./chunk-FTK4JS65.js";
12
+ } from "./chunk-KNWJIJVO.js";
13
13
  import {
14
14
  plural as plural2
15
15
  } from "./chunk-4PA526S7.js";
16
16
  import {
17
17
  createOutbound
18
- } from "./chunk-MEEJIIIA.js";
18
+ } from "./chunk-2ADIGC2N.js";
19
19
  import {
20
20
  plural
21
21
  } from "./chunk-PTZO4QXR.js";
@@ -25,7 +25,10 @@ import {
25
25
  } from "./chunk-QGRZDTX4.js";
26
26
  import {
27
27
  fromEnv
28
- } from "./chunk-5XLR6XVV.js";
28
+ } from "./chunk-TOZKA7JR.js";
29
+ import {
30
+ readEnv
31
+ } from "./chunk-NFWWA7MI.js";
29
32
  import {
30
33
  OutboundError
31
34
  } from "./chunk-XYHM4KHC.js";
@@ -144,6 +147,7 @@ var wantsRedact = (flags, fromConfig, mcp) => {
144
147
  }
145
148
  return !fromConfig && (flags.redact === true || mcp);
146
149
  };
150
+ var REDACT_KEY_ENV = "OUTBOUND_REDACT_KEY";
147
151
  var capSetting = (mcp) => mcp ? "--max-requests on outbound mcp" : "--max-requests";
148
152
  var insightCaps = (flags, mcp) => ({
149
153
  capSetting: capSetting(mcp),
@@ -161,9 +165,14 @@ var setupFor = async (flags, mcp, note) => {
161
165
  const configured = loaded.plugins;
162
166
  const fromConfig = configured.some((plugin) => plugin.name === "redact");
163
167
  const plugins = [];
168
+ const key = readEnv(REDACT_KEY_ENV);
164
169
  if (wantsRedact(flags, fromConfig, mcp)) {
165
170
  const { redact } = await import("../redact/index.js");
166
- plugins.push(redact());
171
+ plugins.push(redact({ key }));
172
+ } else if (fromConfig && key !== void 0) {
173
+ note(
174
+ `${REDACT_KEY_ENV} is set, but the config file's redact() takes its own options, so it is not used. Pass it there as redact({ key: process.env.${REDACT_KEY_ENV} }).`
175
+ );
167
176
  }
168
177
  plugins.push(...configured);
169
178
  if (flags.cache !== void 0) {
@@ -656,7 +665,7 @@ var COMMAND_TABLE = {
656
665
  },
657
666
  person: {
658
667
  flags: ["card", "limit", "slack"],
659
- help: "person <email or LinkedIn URL> [--limit N] [--card | --slack] one person's campaigns across every tool",
668
+ help: "person <email, LinkedIn URL or lead ref> [--limit N] [--card | --slack] one person's campaigns across every tool; a lead ref is taken as another command printed it",
660
669
  // The person_summary insight, with its input taken from the arguments.
661
670
  run: (outbound, input) => runInsight(outbound, {
662
671
  ...input,
@@ -664,7 +673,11 @@ var COMMAND_TABLE = {
664
673
  ...input.flags,
665
674
  input: JSON.stringify({
666
675
  max_campaigns: count(input, "limit", 20),
667
- person: required(input, 0, "an email address or a LinkedIn URL")
676
+ person: required(
677
+ input,
678
+ 0,
679
+ "an email address, a LinkedIn URL or a lead ref"
680
+ )
668
681
  })
669
682
  },
670
683
  positionals: ["person_summary"]
@@ -756,7 +769,7 @@ var COMMAND_TABLE = {
756
769
  const offered = await offeredTools(outbound, input.flags);
757
770
  const tool = offered.find((candidate) => candidate.name === name);
758
771
  if (tool === void 0) {
759
- const { insightLeftOutReason } = await import("./tools-AVJ3XJ5A.js");
772
+ const { insightLeftOutReason } = await import("./tools-EKLZKXZU.js");
760
773
  const why = leftOutReason(outbound, name) ?? insightLeftOutReason(outbound, name);
761
774
  if (why !== void 0) {
762
775
  throw new OutboundError("Unsupported", why, {
@@ -1021,7 +1034,8 @@ var GLOBAL_HELP = [
1021
1034
  " --cache <seconds> reuse an answer for this long, within this process (for mcp; use a config-file store to persist)",
1022
1035
  " --max-requests <n> the most vendor requests one command, or one MCP tool call, may make",
1023
1036
  "",
1024
- "Each adapter reads its own key from the environment, for example INSTANTLY_API_KEY."
1037
+ "Each adapter reads its own key from the environment, for example INSTANTLY_API_KEY.",
1038
+ "OUTBOUND_REDACT_KEY, a secret of at least 32 characters, gives redact the same tokens in every run."
1025
1039
  ];
1026
1040
  var helpText = () => [
1027
1041
  "outbound: read-only access to outbound sending tools",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createTools
3
- } from "./chunk-OVTYA3IB.js";
3
+ } from "./chunk-HDTOGEVN.js";
4
4
  import {
5
5
  parseJson
6
6
  } from "./chunk-45TXPJW7.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fromOne,
3
3
  variantKey
4
- } from "./chunk-UOJG4VYF.js";
4
+ } from "./chunk-LD5OAELW.js";
5
5
  import {
6
6
  eventData,
7
7
  refTo
@@ -2,18 +2,19 @@ import {
2
2
  INSIGHT_TOOL_CEILING,
3
3
  insightLeftOutReason,
4
4
  insightTools
5
- } from "./chunk-KMQHXFIZ.js";
6
- import "./chunk-FTK4JS65.js";
5
+ } from "./chunk-CTRYCW4G.js";
6
+ import "./chunk-KNWJIJVO.js";
7
7
  import "./chunk-4PA526S7.js";
8
+ import "./chunk-I7GBBHD2.js";
8
9
  import "./chunk-HZCTYL22.js";
9
10
  import "./chunk-HPNGSG5E.js";
10
11
  import "./chunk-PTZO4QXR.js";
11
12
  import "./chunk-FALWG5U3.js";
12
- import "./chunk-POBAY3TI.js";
13
+ import "./chunk-HXCZMMSD.js";
13
14
  import "./chunk-CPACP4YD.js";
14
15
  import "./chunk-QGRZDTX4.js";
16
+ import "./chunk-OPLXELPS.js";
15
17
  import "./chunk-HXB2IOJJ.js";
16
- import "./chunk-YFJ3OQZS.js";
17
18
  import "./chunk-XYHM4KHC.js";
18
19
  import "./chunk-45TXPJW7.js";
19
20
  export {
package/dist/cli/bin.js CHANGED
@@ -1,23 +1,24 @@
1
1
  #!/usr/bin/env node
2
- import "../chunks/chunk-NAYVG7SI.js";
3
- import "../chunks/chunk-KQCIF5IT.js";
4
- import "../chunks/chunk-OMCDMELK.js";
5
- import "../chunks/chunk-OVTYA3IB.js";
6
- import "../chunks/chunk-FTK4JS65.js";
2
+ import "../chunks/chunk-3DDYXUDG.js";
3
+ import "../chunks/chunk-UIINRLHQ.js";
4
+ import "../chunks/chunk-UWNQEQIX.js";
5
+ import "../chunks/chunk-HDTOGEVN.js";
6
+ import "../chunks/chunk-KNWJIJVO.js";
7
7
  import "../chunks/chunk-4PA526S7.js";
8
+ import "../chunks/chunk-I7GBBHD2.js";
8
9
  import "../chunks/chunk-HZCTYL22.js";
9
- import "../chunks/chunk-MEEJIIIA.js";
10
+ import "../chunks/chunk-2ADIGC2N.js";
10
11
  import "../chunks/chunk-4O2HRTTI.js";
11
12
  import "../chunks/chunk-HPNGSG5E.js";
12
- import "../chunks/chunk-A7DLJUA6.js";
13
+ import "../chunks/chunk-B72F56HF.js";
13
14
  import "../chunks/chunk-PTZO4QXR.js";
14
- import "../chunks/chunk-POBAY3TI.js";
15
+ import "../chunks/chunk-HXCZMMSD.js";
15
16
  import "../chunks/chunk-CPACP4YD.js";
16
17
  import "../chunks/chunk-QGRZDTX4.js";
18
+ import "../chunks/chunk-OPLXELPS.js";
17
19
  import "../chunks/chunk-HXB2IOJJ.js";
18
- import "../chunks/chunk-YFJ3OQZS.js";
19
20
  import "../chunks/chunk-KVAG5GM2.js";
20
- import "../chunks/chunk-5XLR6XVV.js";
21
+ import "../chunks/chunk-TOZKA7JR.js";
21
22
  import "../chunks/chunk-NFWWA7MI.js";
22
23
  import "../chunks/chunk-XYHM4KHC.js";
23
24
  import "../chunks/chunk-45TXPJW7.js";
@@ -21,6 +21,8 @@ export interface PluginFlags {
21
21
  readonly "max-requests"?: string | undefined;
22
22
  readonly cache?: string | undefined;
23
23
  }
24
+ /** The secret that keys redact's tokens across runs, when set. Never printed. */
25
+ export declare const REDACT_KEY_ENV = "OUTBOUND_REDACT_KEY";
24
26
  /** What a cap message tells a CLI user to raise. */
25
27
  export declare const capSetting: (mcp: boolean) => string;
26
28
  /**
package/dist/cli/index.js CHANGED
@@ -6,24 +6,25 @@ import {
6
6
  run,
7
7
  serveStdio,
8
8
  throttleMonitor
9
- } from "../chunks/chunk-KQCIF5IT.js";
10
- import "../chunks/chunk-OMCDMELK.js";
11
- import "../chunks/chunk-OVTYA3IB.js";
12
- import "../chunks/chunk-FTK4JS65.js";
9
+ } from "../chunks/chunk-UIINRLHQ.js";
10
+ import "../chunks/chunk-UWNQEQIX.js";
11
+ import "../chunks/chunk-HDTOGEVN.js";
12
+ import "../chunks/chunk-KNWJIJVO.js";
13
13
  import "../chunks/chunk-4PA526S7.js";
14
+ import "../chunks/chunk-I7GBBHD2.js";
14
15
  import "../chunks/chunk-HZCTYL22.js";
15
- import "../chunks/chunk-MEEJIIIA.js";
16
+ import "../chunks/chunk-2ADIGC2N.js";
16
17
  import "../chunks/chunk-4O2HRTTI.js";
17
18
  import "../chunks/chunk-HPNGSG5E.js";
18
- import "../chunks/chunk-A7DLJUA6.js";
19
+ import "../chunks/chunk-B72F56HF.js";
19
20
  import "../chunks/chunk-PTZO4QXR.js";
20
- import "../chunks/chunk-POBAY3TI.js";
21
+ import "../chunks/chunk-HXCZMMSD.js";
21
22
  import "../chunks/chunk-CPACP4YD.js";
22
23
  import "../chunks/chunk-QGRZDTX4.js";
24
+ import "../chunks/chunk-OPLXELPS.js";
23
25
  import "../chunks/chunk-HXB2IOJJ.js";
24
- import "../chunks/chunk-YFJ3OQZS.js";
25
26
  import "../chunks/chunk-KVAG5GM2.js";
26
- import "../chunks/chunk-5XLR6XVV.js";
27
+ import "../chunks/chunk-TOZKA7JR.js";
27
28
  import "../chunks/chunk-NFWWA7MI.js";
28
29
  import "../chunks/chunk-XYHM4KHC.js";
29
30
  import "../chunks/chunk-45TXPJW7.js";
@@ -3,11 +3,11 @@ import {
3
3
  mergeFields,
4
4
  resolveCapabilities,
5
5
  resolveFields
6
- } from "../chunks/chunk-A7DLJUA6.js";
6
+ } from "../chunks/chunk-B72F56HF.js";
7
7
  import {
8
8
  recordBase
9
9
  } from "../chunks/chunk-U5AK6OJM.js";
10
- import "../chunks/chunk-POBAY3TI.js";
10
+ import "../chunks/chunk-HXCZMMSD.js";
11
11
  import "../chunks/chunk-QGRZDTX4.js";
12
12
  import {
13
13
  parseRef
@@ -406,6 +406,18 @@ var messageLists = (members) => ({
406
406
  },
407
407
  pageNewestFirst
408
408
  ),
409
+ listSenderHealth: (query, ctx) => scopedOrAcross(
410
+ members,
411
+ ctx,
412
+ query,
413
+ (member, memberCtx, scoped) => {
414
+ if (member.listSenderHealth === void 0) {
415
+ throw missing2(member, "listSenderHealth");
416
+ }
417
+ return member.listSenderHealth(scoped, memberCtx);
418
+ },
419
+ takeInTurn
420
+ ),
409
421
  listSenders: (query, ctx) => scopedOrAcross(
410
422
  members,
411
423
  ctx,
@@ -456,6 +468,28 @@ var lookups = (members) => ({
456
468
  routed.ctx
457
469
  );
458
470
  }
471
+ if (query.scopeIds !== void 0) {
472
+ const routes = query.scopeIds.map(
473
+ (id) => routeRef(members, ctx, id, "Stats scope")
474
+ );
475
+ const asked = members.flatMap((member) => {
476
+ const own = routes.filter((routed) => routed.member === member);
477
+ const [first] = own;
478
+ return first === void 0 ? [] : [{ first, own }];
479
+ });
480
+ const perSenders = await Promise.all(
481
+ asked.map(({ first, own }) => {
482
+ if (first.member.stats === void 0) {
483
+ throw missing2(first.member, "stats");
484
+ }
485
+ return first.member.stats(
486
+ { ...query, scopeIds: own.map((routed) => routed.id) },
487
+ first.ctx
488
+ );
489
+ })
490
+ );
491
+ return perSenders.flat();
492
+ }
459
493
  const perMember = await Promise.all(
460
494
  members.map((member) => {
461
495
  if (member.stats === void 0) {
@@ -22,7 +22,7 @@ import {
22
22
  toTag,
23
23
  toWebhook,
24
24
  toWorkspace
25
- } from "../chunks/chunk-UZLFZZ2U.js";
25
+ } from "../chunks/chunk-AWNH4I5D.js";
26
26
  import {
27
27
  applyTracking,
28
28
  ownTracking,
@@ -40,7 +40,7 @@ import {
40
40
  import {
41
41
  toVariant,
42
42
  variantKey
43
- } from "../chunks/chunk-UOJG4VYF.js";
43
+ } from "../chunks/chunk-LD5OAELW.js";
44
44
  import "../chunks/chunk-FALWG5U3.js";
45
45
  import {
46
46
  defineNative,
@@ -52,17 +52,17 @@ import {
52
52
  recordBase,
53
53
  refTo
54
54
  } from "../chunks/chunk-U5AK6OJM.js";
55
- import "../chunks/chunk-POBAY3TI.js";
55
+ import "../chunks/chunk-HXCZMMSD.js";
56
56
  import {
57
57
  emptyCounts,
58
58
  metricRow,
59
59
  sumCounts
60
60
  } from "../chunks/chunk-CPACP4YD.js";
61
61
  import "../chunks/chunk-QGRZDTX4.js";
62
+ import "../chunks/chunk-OPLXELPS.js";
62
63
  import {
63
64
  assertWorkspaceId
64
65
  } from "../chunks/chunk-HXB2IOJJ.js";
65
- import "../chunks/chunk-YFJ3OQZS.js";
66
66
  import "../chunks/chunk-KVAG5GM2.js";
67
67
  import {
68
68
  readEnv,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  evidenceSchema
3
- } from "../chunks/chunk-POBAY3TI.js";
3
+ } from "../chunks/chunk-HXCZMMSD.js";
4
4
  import "../chunks/chunk-QGRZDTX4.js";
5
+ import {
6
+ profileSlug
7
+ } from "../chunks/chunk-OPLXELPS.js";
5
8
  import {
6
9
  makeRef,
7
10
  parseRef
8
11
  } from "../chunks/chunk-HXB2IOJJ.js";
9
- import {
10
- profileSlug
11
- } from "../chunks/chunk-YFJ3OQZS.js";
12
12
  import {
13
13
  stableId
14
14
  } from "../chunks/chunk-KVAG5GM2.js";
@@ -13,7 +13,7 @@ import {
13
13
  listIn,
14
14
  toVariant,
15
15
  variantKey
16
- } from "../chunks/chunk-UOJG4VYF.js";
16
+ } from "../chunks/chunk-LD5OAELW.js";
17
17
  import {
18
18
  normalizeBody
19
19
  } from "../chunks/chunk-FALWG5U3.js";
@@ -26,18 +26,18 @@ import {
26
26
  refTo,
27
27
  refsTo
28
28
  } from "../chunks/chunk-U5AK6OJM.js";
29
- import "../chunks/chunk-POBAY3TI.js";
29
+ import "../chunks/chunk-HXCZMMSD.js";
30
30
  import {
31
31
  emptyCounts,
32
32
  metricRow
33
33
  } from "../chunks/chunk-CPACP4YD.js";
34
34
  import "../chunks/chunk-QGRZDTX4.js";
35
+ import {
36
+ profileSlug
37
+ } from "../chunks/chunk-OPLXELPS.js";
35
38
  import {
36
39
  assertWorkspaceId
37
40
  } from "../chunks/chunk-HXB2IOJJ.js";
38
- import {
39
- profileSlug
40
- } from "../chunks/chunk-YFJ3OQZS.js";
41
41
  import {
42
42
  stableId
43
43
  } from "../chunks/chunk-KVAG5GM2.js";
@@ -272,6 +272,7 @@ var profileFields = (identity, profile, raw) => ({
272
272
  tags: tagNames(field(profile, "tags")),
273
273
  linkedinUrl: text(field(profile, "profileUrl")),
274
274
  location: text(field(profile, "location")),
275
+ meeting: null,
275
276
  // HeyReach profiles carry no phone number and no company website.
276
277
  phone: null,
277
278
  recipientMailProvider: null,
@@ -427,6 +428,7 @@ var fields = {
427
428
  // LinkedIn has no bounce and no unsubscribe.
428
429
  bounced: false,
429
430
  engagement: false,
431
+ meeting: false,
430
432
  phone: false,
431
433
  recipientMailProvider: false,
432
434
  unsubscribed: false,
@@ -437,6 +439,8 @@ var fields = {
437
439
  isAuto: false,
438
440
  isAutoSource: false,
439
441
  stepIndex: false,
442
+ // HeyReach documents no link to a Unibox conversation.
443
+ url: false,
440
444
  variantKey: false
441
445
  },
442
446
  metricRow: {
@@ -471,6 +475,7 @@ var fields = {
471
475
  isAutoSource: false,
472
476
  leftCompany: false,
473
477
  stepIndex: false,
478
+ url: false,
474
479
  variantKey: false
475
480
  },
476
481
  sender: {
@@ -590,7 +595,8 @@ var caveats = [
590
595
  "Three documented reads are not offered: the workspace API keys and a LinkedIn account's proxy (both return secrets, and raw refuses them), and a voice message's audio file, which is not JSON and would not survive the request engine, which reads every body as text. A voice message's transcript and duration are in its conversation.",
591
596
  "The workspace's tags cannot be listed: the API creates tags and reads one lead's tags, nothing more. A tag has a name and a colour and no id.",
592
597
  "Only the voice_note_received webhook payload is documented. Other events are assumed to share its skeleton, and the lowercase event_type names are inferred from two examples.",
593
- "Webhooks are not signed; correlation_id is the only identifier and is assumed to be stable across redelivery."
598
+ "Webhooks are not signed; correlation_id is the only identifier and is assumed to be stable across redelivery.",
599
+ "A message's or reply's url is null: HeyReach documents no link to a Unibox conversation, and no read returns one (checked live on 2026-11-17: a conversation's only URLs are LinkedIn profile, image and company links)."
594
600
  ];
595
601
 
596
602
  // src/heyreach/paging.ts
@@ -940,6 +946,8 @@ var messageFields = (scope, conversation, raw) => {
940
946
  subject: text(raw.subject),
941
947
  // Without the account the conversation cannot be read back, so no thread.
942
948
  threadId: conversationId === "" || accountId === null ? null : `${accountId}:${conversationId}`,
949
+ // HeyReach documents no link to a conversation in its Unibox.
950
+ url: null,
943
951
  variantKey: null
944
952
  };
945
953
  };