outbound-sdk 0.7.0 → 0.8.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 (121) hide show
  1. package/dist/alerts/index.js +3 -3
  2. package/dist/audit/index.js +1 -1
  3. package/dist/benchmarks/index.js +3 -3
  4. package/dist/budget/index.d.ts +7 -0
  5. package/dist/budget/index.js +3 -3
  6. package/dist/cache/index.js +2 -2
  7. package/dist/cards/index.js +17 -5
  8. package/dist/chunks/{chunk-ZJCVLBAE.js → chunk-4GK56PRO.js} +667 -363
  9. package/dist/chunks/{chunk-MW4C6LTN.js → chunk-7TASUWPC.js} +2 -2
  10. package/dist/chunks/{chunk-M2VXGLLZ.js → chunk-CPACP4YD.js} +1 -1
  11. package/dist/chunks/{chunk-4AVYRVN5.js → chunk-FTK4JS65.js} +31 -10
  12. package/dist/chunks/{chunk-YW6FFVSZ.js → chunk-HXB2IOJJ.js} +1 -1
  13. package/dist/chunks/{chunk-Y7KECJAV.js → chunk-IKKCMWBK.js} +1 -1
  14. package/dist/chunks/{chunk-FHKSLCVW.js → chunk-KVAG5GM2.js} +19 -0
  15. package/dist/chunks/{chunk-7I3EPR23.js → chunk-MPE6VLLY.js} +3 -3
  16. package/dist/chunks/{chunk-UFQ4WMLU.js → chunk-NFWWA7MI.js} +1 -1
  17. package/dist/chunks/{chunk-GL7BABF2.js → chunk-OMCDMELK.js} +1 -1
  18. package/dist/chunks/{chunk-JRL3QRBS.js → chunk-OVTYA3IB.js} +88 -28
  19. package/dist/chunks/{chunk-HIAK2GCI.js → chunk-RMAHQ2OZ.js} +5 -1
  20. package/dist/chunks/{chunk-65YAGEWZ.js → chunk-RQLOPMMR.js} +153 -39
  21. package/dist/chunks/{chunk-OK3GAZMT.js → chunk-SYUMA3CP.js} +12 -0
  22. package/dist/chunks/{chunk-LVZGIKNF.js → chunk-U5AK6OJM.js} +1 -1
  23. package/dist/chunks/{chunk-KTYTE2BU.js → chunk-UAHYPASH.js} +20 -11
  24. package/dist/chunks/{chunk-BNDHEDHD.js → chunk-UOJG4VYF.js} +3 -3
  25. package/dist/chunks/{chunk-LD6F46UT.js → chunk-UWD65SK7.js} +2 -2
  26. package/dist/chunks/{chunk-I7DXXGNZ.js → chunk-UZLFZZ2U.js} +5 -5
  27. package/dist/chunks/{chunk-DNPNTD5W.js → chunk-VVDBCQLK.js} +1 -1
  28. package/dist/chunks/{chunk-IVH3NMQZ.js → chunk-WROJO6XB.js} +1 -1
  29. package/dist/chunks/chunk-XMCNRU4H.js +7279 -0
  30. package/dist/chunks/{chunk-QFC4ZHD3.js → chunk-XYHM4KHC.js} +1 -1
  31. package/dist/chunks/{chunk-NAWZ73QS.js → chunk-YFJ3OQZS.js} +8 -1
  32. package/dist/chunks/tools-II7GXAOM.js +23 -0
  33. package/dist/cli/args.d.ts +48 -0
  34. package/dist/cli/bin.js +14 -14
  35. package/dist/cli/commands.d.ts +0 -7
  36. package/dist/cli/config.d.ts +31 -2
  37. package/dist/cli/envelope.d.ts +2 -0
  38. package/dist/cli/index.d.ts +6 -0
  39. package/dist/cli/index.js +19 -15
  40. package/dist/cli/listing.d.ts +5 -2
  41. package/dist/cli/mcp.d.ts +9 -0
  42. package/dist/cli/offered.d.ts +10 -0
  43. package/dist/cli/options.d.ts +6 -0
  44. package/dist/cli/progress.d.ts +27 -0
  45. package/dist/cli/serve.d.ts +17 -0
  46. package/dist/cli/update.d.ts +25 -2
  47. package/dist/clients/index.js +3 -3
  48. package/dist/combine/index.js +154 -35
  49. package/dist/combine/newest.d.ts +18 -0
  50. package/dist/combine/route.d.ts +19 -5
  51. package/dist/emailbison/index.js +22 -14
  52. package/dist/emailbison/map-sequence.d.ts +2 -1
  53. package/dist/exporter/index.js +1 -1
  54. package/dist/failover/index.js +3 -3
  55. package/dist/fixtures/index.js +4 -4
  56. package/dist/heyreach/capabilities.d.ts +4 -0
  57. package/dist/heyreach/conversations.d.ts +23 -0
  58. package/dist/heyreach/inbox.d.ts +0 -1
  59. package/dist/heyreach/index.js +251 -92
  60. package/dist/identity/index.js +2 -2
  61. package/dist/index.js +7 -7
  62. package/dist/insights/capped.d.ts +6 -6
  63. package/dist/insights/copy/index.d.ts +2 -0
  64. package/dist/insights/copy/reply-timing.d.ts +4 -0
  65. package/dist/insights/cost.d.ts +11 -1
  66. package/dist/insights/define.d.ts +25 -16
  67. package/dist/insights/inbox.d.ts +12 -0
  68. package/dist/insights/index.js +42 -6578
  69. package/dist/insights/inputs.generated.d.ts +60 -24
  70. package/dist/insights/ops/anomalies.d.ts +9 -0
  71. package/dist/insights/ops/index.d.ts +2 -0
  72. package/dist/insights/ops/period-comparison.d.ts +7 -8
  73. package/dist/insights/ops/pipeline-forecast.d.ts +10 -0
  74. package/dist/insights/ops/shared.d.ts +6 -1
  75. package/dist/insights/people/auto-replies.d.ts +11 -7
  76. package/dist/insights/people/dropped-replies.d.ts +13 -4
  77. package/dist/insights/people/hot-leads-read.d.ts +31 -0
  78. package/dist/insights/people/hot-leads.d.ts +15 -3
  79. package/dist/insights/people/index.d.ts +10 -2
  80. package/dist/insights/people/read.d.ts +1 -1
  81. package/dist/insights/registry.d.ts +14 -2
  82. package/dist/insights/run-cap.d.ts +10 -0
  83. package/dist/insights/senders/read.d.ts +0 -3
  84. package/dist/insights/tools.d.ts +12 -0
  85. package/dist/insights/tracked-reads.d.ts +53 -0
  86. package/dist/instantly/capabilities.d.ts +13 -1
  87. package/dist/instantly/index.js +122 -46
  88. package/dist/instantly/map-account.d.ts +2 -1
  89. package/dist/instantly/map-lead.d.ts +1 -0
  90. package/dist/instantly/map.d.ts +4 -3
  91. package/dist/internal/adapter.d.ts +17 -0
  92. package/dist/internal/capabilities.d.ts +13 -0
  93. package/dist/internal/engine/budget.d.ts +9 -1
  94. package/dist/internal/engine/engine.d.ts +2 -1
  95. package/dist/internal/engine/request.d.ts +2 -0
  96. package/dist/internal/errors.d.ts +5 -0
  97. package/dist/internal/hooks.d.ts +11 -0
  98. package/dist/internal/notes.d.ts +16 -0
  99. package/dist/internal/outbound/api.d.ts +14 -0
  100. package/dist/internal/outbound/core.d.ts +4 -1
  101. package/dist/internal/outbound/operation-shared.d.ts +2 -0
  102. package/dist/internal/sha256.d.ts +2 -0
  103. package/dist/internal/url.d.ts +1 -0
  104. package/dist/loader/index.js +3 -3
  105. package/dist/memory/index.js +6 -6
  106. package/dist/redact/index.d.ts +1 -1
  107. package/dist/redact/index.js +107 -19
  108. package/dist/redact/plugin.d.ts +26 -3
  109. package/dist/smartlead/index.js +22 -13
  110. package/dist/smartlead/map.d.ts +3 -2
  111. package/dist/sync/index.js +2 -2
  112. package/dist/tools/ai-sdk.js +5 -5
  113. package/dist/tools/by-name.d.ts +9 -1
  114. package/dist/tools/campaign-tools.d.ts +3 -1
  115. package/dist/tools/claude-agent.js +5 -5
  116. package/dist/tools/index.js +6 -6
  117. package/dist/tools/registry.d.ts +6 -0
  118. package/dist/tools/shared.d.ts +5 -1
  119. package/dist/tracing/index.js +1 -1
  120. package/dist/webhooks/index.js +11 -11
  121. package/package.json +1 -1
@@ -9,12 +9,12 @@ import {
9
9
  } from "../chunks/chunk-POBAY3TI.js";
10
10
  import {
11
11
  computeRates
12
- } from "../chunks/chunk-M2VXGLLZ.js";
12
+ } from "../chunks/chunk-CPACP4YD.js";
13
13
  import "../chunks/chunk-QGRZDTX4.js";
14
- import "../chunks/chunk-YW6FFVSZ.js";
14
+ import "../chunks/chunk-HXB2IOJJ.js";
15
15
  import {
16
16
  OutboundError
17
- } from "../chunks/chunk-QFC4ZHD3.js";
17
+ } from "../chunks/chunk-XYHM4KHC.js";
18
18
  import "../chunks/chunk-45TXPJW7.js";
19
19
 
20
20
  // src/alerts/plugin.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OutboundError
3
- } from "../chunks/chunk-QFC4ZHD3.js";
3
+ } from "../chunks/chunk-XYHM4KHC.js";
4
4
  import "../chunks/chunk-45TXPJW7.js";
5
5
 
6
6
  // src/audit/index.ts
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  computeRates
3
- } from "../chunks/chunk-M2VXGLLZ.js";
3
+ } from "../chunks/chunk-CPACP4YD.js";
4
4
  import "../chunks/chunk-QGRZDTX4.js";
5
- import "../chunks/chunk-YW6FFVSZ.js";
5
+ import "../chunks/chunk-HXB2IOJJ.js";
6
6
  import {
7
7
  OutboundError
8
- } from "../chunks/chunk-QFC4ZHD3.js";
8
+ } from "../chunks/chunk-XYHM4KHC.js";
9
9
  import "../chunks/chunk-45TXPJW7.js";
10
10
 
11
11
  // src/benchmarks/index.ts
@@ -8,6 +8,13 @@ export interface BudgetOptions {
8
8
  * `maxRequestsPerCall` on `createOutbound` does.
9
9
  */
10
10
  readonly per?: "call" | "run" | undefined;
11
+ /**
12
+ * What the message of a stopped run tells the reader to raise, for a
13
+ * surface that sets the budget its own way: the CLI names its
14
+ * `--max-requests` flag. Without it the message names `budget()` and
15
+ * `requestBudget.reset()`.
16
+ */
17
+ readonly setting?: string | undefined;
11
18
  }
12
19
  export interface BudgetExtension {
13
20
  readonly requestBudget: {
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunks/chunk-PTZO4QXR.js";
4
4
  import {
5
5
  OutboundError
6
- } from "../chunks/chunk-QFC4ZHD3.js";
6
+ } from "../chunks/chunk-XYHM4KHC.js";
7
7
  import "../chunks/chunk-45TXPJW7.js";
8
8
 
9
9
  // src/budget/index.ts
@@ -20,7 +20,7 @@ var budget = (options) => {
20
20
  const live = /* @__PURE__ */ new WeakMap();
21
21
  const spent = (provider) => new OutboundError(
22
22
  "RateLimited",
23
- `The run used its budget of ${plural(options.maxRequests, "request")} to ${provider}. Call requestBudget.reset() to start a new run, or raise budget()'s maxRequests.`,
23
+ `The run used its budget of ${plural(options.maxRequests, "request")} to ${provider}. ${options.setting === void 0 ? "Call requestBudget.reset() to start a new run, or raise budget()'s maxRequests." : `Raise ${options.setting}.`}`,
24
24
  { limit: "run", provider }
25
25
  );
26
26
  return {
@@ -42,7 +42,7 @@ var budget = (options) => {
42
42
  }
43
43
  if (!perRun && (state.maxRequests === void 0 || options.maxRequests < state.maxRequests)) {
44
44
  state.maxRequests = options.maxRequests;
45
- state.maxRequestsSetBy = "budget()'s maxRequests";
45
+ state.maxRequestsSetBy = options.setting ?? "budget()'s maxRequests";
46
46
  }
47
47
  if (!live.has(state)) {
48
48
  live.set(state, 0);
@@ -2,8 +2,8 @@ import {
2
2
  cache,
3
3
  cacheKey,
4
4
  memoryCacheStore
5
- } from "../chunks/chunk-IVH3NMQZ.js";
6
- import "../chunks/chunk-FHKSLCVW.js";
5
+ } from "../chunks/chunk-WROJO6XB.js";
6
+ import "../chunks/chunk-KVAG5GM2.js";
7
7
  export {
8
8
  cache,
9
9
  cacheKey,
@@ -888,24 +888,36 @@ var suppressionCheck = (data) => {
888
888
  title: "Suppression check"
889
889
  };
890
890
  };
891
+ var notChecked = (totals) => {
892
+ const unchecked = num(totals, "unchecked") ?? 0;
893
+ if (unchecked > 0) {
894
+ return `\u{1F7E1} Could not check ${plural(unchecked, "conversation")}, so a reply there may be waiting.`;
895
+ }
896
+ return bool(totals, "moreRepliesExist") === true ? "\u{1F7E1} Could not check every reply: the read stopped with more left." : null;
897
+ };
891
898
  var droppedReplies = (data) => {
892
899
  const totals = child(data, "totals");
893
900
  const dropped = rows(data, "dropped");
894
901
  const [longest] = dropped;
902
+ const unchecked = num(totals, "unchecked") ?? 0;
895
903
  return {
896
- bullets: bool(totals, "moreRepliesExist") === true ? [
897
- `\u{1F7E1} Stopped at ${plural(num(totals, "repliesRead") ?? 0, "reply", "replies")} read; more exist and were not checked.`
898
- ] : [],
904
+ bullets: [
905
+ ...bool(totals, "moreRepliesExist") === true ? [
906
+ `\u{1F7E1} Stopped at ${plural(num(totals, "repliesRead") ?? 0, "reply", "replies")} read; more exist and were not checked.`
907
+ ] : [],
908
+ ...longest !== void 0 && unchecked > 0 ? [`\u{1F7E1} Could not check ${plural(unchecked, "conversation")}.`] : []
909
+ ],
899
910
  finding: verdict(
900
911
  num(totals, "repliesRead"),
901
- longest === void 0 ? null : `\u{1F534} ${plural(dropped.length, "reply", "replies")} waiting. The longest has waited ${waiting(num(longest, "hoursWaiting"))}.`,
912
+ longest === void 0 ? notChecked(totals) : `\u{1F534} ${plural(dropped.length, "reply", "replies")} waiting. The longest has waited ${waiting(num(longest, "hoursWaiting"))}.`,
902
913
  "Every reply read has an answer."
903
914
  ),
904
915
  stats: [
905
916
  ["Unanswered", int(num(totals, "dropped"))],
906
917
  ["Answered", int(num(totals, "answered"))],
907
918
  ["Conversations", int(num(totals, "conversations"))],
908
- ["Too recent to count", int(num(totals, "tooRecent"))]
919
+ ["Too recent to count", int(num(totals, "tooRecent"))],
920
+ ["Could not check", int(unchecked)]
909
921
  ],
910
922
  table: {
911
923
  align: [LEFT, LEFT, LEFT, RIGHT],