outbound-sdk 0.7.1 → 0.9.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 (120) 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-6NSCPTOY.js → chunk-4BH5LRCS.js} +691 -441
  9. package/dist/chunks/{chunk-MW4C6LTN.js → chunk-5XLR6XVV.js} +2 -2
  10. package/dist/chunks/{chunk-HIAK2GCI.js → chunk-A7DLJUA6.js} +6 -1
  11. package/dist/chunks/{chunk-M2VXGLLZ.js → chunk-CPACP4YD.js} +1 -1
  12. package/dist/chunks/{chunk-4AVYRVN5.js → chunk-FTK4JS65.js} +31 -10
  13. package/dist/chunks/{chunk-YW6FFVSZ.js → chunk-HXB2IOJJ.js} +1 -1
  14. package/dist/chunks/{chunk-FHKSLCVW.js → chunk-KVAG5GM2.js} +19 -0
  15. package/dist/chunks/{chunk-65YAGEWZ.js → chunk-MEEJIIIA.js} +178 -39
  16. package/dist/chunks/{chunk-7I3EPR23.js → chunk-MPE6VLLY.js} +3 -3
  17. package/dist/chunks/{chunk-UFQ4WMLU.js → chunk-NFWWA7MI.js} +1 -1
  18. package/dist/chunks/{chunk-GL7BABF2.js → chunk-OMCDMELK.js} +1 -1
  19. package/dist/chunks/{chunk-JRL3QRBS.js → chunk-OVTYA3IB.js} +88 -28
  20. package/dist/chunks/{chunk-T5MJMW3R.js → chunk-QTWJ5FO7.js} +1 -1
  21. package/dist/chunks/chunk-REDFBY74.js +7285 -0
  22. package/dist/chunks/{chunk-OK3GAZMT.js → chunk-SYUMA3CP.js} +12 -0
  23. package/dist/chunks/{chunk-LVZGIKNF.js → chunk-U5AK6OJM.js} +1 -1
  24. package/dist/chunks/{chunk-KTYTE2BU.js → chunk-UAHYPASH.js} +20 -11
  25. package/dist/chunks/{chunk-BNDHEDHD.js → chunk-UOJG4VYF.js} +3 -3
  26. package/dist/chunks/{chunk-LD6F46UT.js → chunk-UWD65SK7.js} +2 -2
  27. package/dist/chunks/{chunk-I7DXXGNZ.js → chunk-UZLFZZ2U.js} +5 -5
  28. package/dist/chunks/{chunk-DNPNTD5W.js → chunk-VVDBCQLK.js} +1 -1
  29. package/dist/chunks/{chunk-IVH3NMQZ.js → chunk-WROJO6XB.js} +1 -1
  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-ATY622UC.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 +4 -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/clients/index.js +3 -3
  47. package/dist/combine/index.js +154 -35
  48. package/dist/combine/newest.d.ts +18 -0
  49. package/dist/combine/route.d.ts +19 -5
  50. package/dist/emailbison/index.js +22 -14
  51. package/dist/emailbison/map-sequence.d.ts +2 -1
  52. package/dist/exporter/index.js +1 -1
  53. package/dist/failover/index.js +3 -3
  54. package/dist/fixtures/index.js +4 -4
  55. package/dist/heyreach/capabilities.d.ts +4 -0
  56. package/dist/heyreach/conversations.d.ts +23 -0
  57. package/dist/heyreach/inbox.d.ts +0 -1
  58. package/dist/heyreach/index.js +251 -92
  59. package/dist/identity/index.js +2 -2
  60. package/dist/index.js +7 -7
  61. package/dist/insights/capped.d.ts +6 -6
  62. package/dist/insights/copy/index.d.ts +2 -0
  63. package/dist/insights/copy/reply-timing.d.ts +4 -0
  64. package/dist/insights/cost.d.ts +11 -1
  65. package/dist/insights/define.d.ts +25 -16
  66. package/dist/insights/inbox.d.ts +12 -0
  67. package/dist/insights/index.js +42 -6578
  68. package/dist/insights/inputs.generated.d.ts +62 -26
  69. package/dist/insights/ops/anomalies.d.ts +9 -0
  70. package/dist/insights/ops/index.d.ts +2 -0
  71. package/dist/insights/ops/period-comparison.d.ts +7 -8
  72. package/dist/insights/ops/pipeline-forecast.d.ts +16 -0
  73. package/dist/insights/ops/shared.d.ts +6 -1
  74. package/dist/insights/people/auto-replies.d.ts +11 -7
  75. package/dist/insights/people/dropped-replies.d.ts +13 -4
  76. package/dist/insights/people/hot-leads-read.d.ts +31 -0
  77. package/dist/insights/people/hot-leads.d.ts +15 -3
  78. package/dist/insights/people/index.d.ts +10 -2
  79. package/dist/insights/people/read.d.ts +1 -1
  80. package/dist/insights/registry.d.ts +14 -2
  81. package/dist/insights/run-cap.d.ts +10 -0
  82. package/dist/insights/senders/read.d.ts +0 -3
  83. package/dist/insights/tools.d.ts +12 -0
  84. package/dist/insights/tracked-reads.d.ts +53 -0
  85. package/dist/instantly/capabilities.d.ts +13 -1
  86. package/dist/instantly/index.js +128 -46
  87. package/dist/instantly/map-account.d.ts +2 -1
  88. package/dist/instantly/map-lead.d.ts +1 -0
  89. package/dist/instantly/map.d.ts +4 -3
  90. package/dist/internal/adapter.d.ts +19 -0
  91. package/dist/internal/capabilities.d.ts +15 -0
  92. package/dist/internal/engine/budget.d.ts +9 -1
  93. package/dist/internal/engine/engine.d.ts +2 -1
  94. package/dist/internal/engine/request.d.ts +2 -0
  95. package/dist/internal/errors.d.ts +5 -0
  96. package/dist/internal/hooks.d.ts +11 -0
  97. package/dist/internal/notes.d.ts +16 -0
  98. package/dist/internal/outbound/api.d.ts +16 -0
  99. package/dist/internal/outbound/core.d.ts +4 -1
  100. package/dist/internal/outbound/operation-shared.d.ts +2 -0
  101. package/dist/internal/sha256.d.ts +2 -0
  102. package/dist/internal/url.d.ts +1 -0
  103. package/dist/loader/index.js +3 -3
  104. package/dist/memory/index.js +11 -16
  105. package/dist/redact/index.d.ts +1 -1
  106. package/dist/redact/index.js +107 -19
  107. package/dist/redact/plugin.d.ts +26 -3
  108. package/dist/smartlead/index.js +22 -13
  109. package/dist/smartlead/map.d.ts +3 -2
  110. package/dist/sync/index.js +2 -2
  111. package/dist/tools/ai-sdk.js +5 -5
  112. package/dist/tools/by-name.d.ts +9 -1
  113. package/dist/tools/campaign-tools.d.ts +3 -1
  114. package/dist/tools/claude-agent.js +5 -5
  115. package/dist/tools/index.js +6 -6
  116. package/dist/tools/registry.d.ts +6 -0
  117. package/dist/tools/shared.d.ts +5 -1
  118. package/dist/tracing/index.js +1 -1
  119. package/dist/webhooks/index.js +11 -11
  120. package/package.json +1 -1
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createTools
3
- } from "../chunks/chunk-JRL3QRBS.js";
4
- import "../chunks/chunk-4AVYRVN5.js";
3
+ } from "../chunks/chunk-OVTYA3IB.js";
4
+ import "../chunks/chunk-FTK4JS65.js";
5
5
  import "../chunks/chunk-4PA526S7.js";
6
6
  import "../chunks/chunk-HZCTYL22.js";
7
7
  import "../chunks/chunk-HPNGSG5E.js";
8
8
  import "../chunks/chunk-PTZO4QXR.js";
9
9
  import "../chunks/chunk-POBAY3TI.js";
10
- import "../chunks/chunk-M2VXGLLZ.js";
10
+ import "../chunks/chunk-CPACP4YD.js";
11
11
  import "../chunks/chunk-QGRZDTX4.js";
12
- import "../chunks/chunk-YW6FFVSZ.js";
13
- import "../chunks/chunk-QFC4ZHD3.js";
12
+ import "../chunks/chunk-HXB2IOJJ.js";
13
+ import "../chunks/chunk-XYHM4KHC.js";
14
14
  import "../chunks/chunk-45TXPJW7.js";
15
15
 
16
16
  // src/tools/ai-sdk.ts
@@ -3,7 +3,8 @@ import type { ListAll, OutboundApi } from "../internal/outbound/api.ts";
3
3
  * Whether `value` is surely a ref or an id, so it is used with no lookup: a
4
4
  * ref, an id in the vendor's documented form, or, on an instance whose id
5
5
  * form is not known (a test adapter, your own adapter), any text without a
6
- * space, as before names were accepted.
6
+ * space, as before names were accepted. On a combined instance only a ref
7
+ * is: a bare id names no member, so it is looked up like a name.
7
8
  */
8
9
  export declare const isIdentifier: (outbound: OutboundApi, value: string) => boolean;
9
10
  /** Reads a whole listing. An insight passes its own, which counts the requests. */
@@ -14,5 +15,12 @@ export declare const resolveCampaign: (outbound: OutboundApi, value: string, rea
14
15
  export declare const resolveList: (outbound: OutboundApi, value: string) => Promise<string>;
15
16
  /** Whether the input's `campaign` is a name, which costs a campaign listing to look up. */
16
17
  export declare const namesCampaign: <Input>(outbound: OutboundApi, input: Input) => boolean;
18
+ /**
19
+ * Where a read of this input goes: on a combined instance whose `campaign`
20
+ * is a ref, the member that ref names, so what that member supports applies
21
+ * rather than what every member does. Anything else stays on `outbound`; a
22
+ * ref of no member is refused later, by the read it reaches.
23
+ */
24
+ export declare const routedByCampaign: <Input>(outbound: OutboundApi, input: Input) => OutboundApi;
17
25
  /** The input with its `campaign`, when it is text, resolved to a ref or id. */
18
26
  export declare const withCampaign: <Input>(outbound: OutboundApi, input: Input, read?: ReadAll) => Promise<Input>;
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import type { ToolDefinition } from "./shared.ts";
3
3
  declare const overviewInput: z.ZodObject<{
4
+ campaign: z.ZodOptional<z.ZodString>;
4
5
  limit: z.ZodDefault<z.ZodNumber>;
5
6
  status: z.ZodDefault<z.ZodEnum<{
6
7
  active: "active";
@@ -13,7 +14,8 @@ declare const overviewInput: z.ZodObject<{
13
14
  from: z.ZodOptional<z.ZodString>;
14
15
  to: z.ZodOptional<z.ZodString>;
15
16
  }, z.core.$strip>;
16
- export declare const campaignOverview: ToolDefinition<z.infer<typeof overviewInput>>;
17
+ type OverviewInput = z.infer<typeof overviewInput>;
18
+ export declare const campaignOverview: ToolDefinition<OverviewInput>;
17
19
  declare const trendInput: z.ZodObject<{
18
20
  campaign: z.ZodString;
19
21
  from: z.ZodOptional<z.ZodString>;
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createTools
3
- } from "../chunks/chunk-JRL3QRBS.js";
4
- import "../chunks/chunk-4AVYRVN5.js";
3
+ } from "../chunks/chunk-OVTYA3IB.js";
4
+ import "../chunks/chunk-FTK4JS65.js";
5
5
  import "../chunks/chunk-4PA526S7.js";
6
6
  import "../chunks/chunk-HZCTYL22.js";
7
7
  import "../chunks/chunk-HPNGSG5E.js";
8
8
  import "../chunks/chunk-PTZO4QXR.js";
9
9
  import "../chunks/chunk-POBAY3TI.js";
10
- import "../chunks/chunk-M2VXGLLZ.js";
10
+ import "../chunks/chunk-CPACP4YD.js";
11
11
  import "../chunks/chunk-QGRZDTX4.js";
12
- import "../chunks/chunk-YW6FFVSZ.js";
13
- import "../chunks/chunk-QFC4ZHD3.js";
12
+ import "../chunks/chunk-HXB2IOJJ.js";
13
+ import "../chunks/chunk-XYHM4KHC.js";
14
14
  import "../chunks/chunk-45TXPJW7.js";
15
15
 
16
16
  // src/tools/claude-agent.ts
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  openaiTools
3
- } from "../chunks/chunk-GL7BABF2.js";
3
+ } from "../chunks/chunk-OMCDMELK.js";
4
4
  import {
5
5
  TOOL_NAMES,
6
6
  createTools
7
- } from "../chunks/chunk-JRL3QRBS.js";
7
+ } from "../chunks/chunk-OVTYA3IB.js";
8
8
  import {
9
9
  DEFAULT_BODY_CHARS,
10
10
  DEFAULT_TOOL_REQUESTS,
11
11
  UNTRUSTED_NOTE
12
- } from "../chunks/chunk-4AVYRVN5.js";
12
+ } from "../chunks/chunk-FTK4JS65.js";
13
13
  import "../chunks/chunk-4PA526S7.js";
14
14
  import "../chunks/chunk-HZCTYL22.js";
15
15
  import "../chunks/chunk-HPNGSG5E.js";
16
16
  import "../chunks/chunk-PTZO4QXR.js";
17
17
  import "../chunks/chunk-POBAY3TI.js";
18
- import "../chunks/chunk-M2VXGLLZ.js";
18
+ import "../chunks/chunk-CPACP4YD.js";
19
19
  import "../chunks/chunk-QGRZDTX4.js";
20
- import "../chunks/chunk-YW6FFVSZ.js";
21
- import "../chunks/chunk-QFC4ZHD3.js";
20
+ import "../chunks/chunk-HXB2IOJJ.js";
21
+ import "../chunks/chunk-XYHM4KHC.js";
22
22
  import "../chunks/chunk-45TXPJW7.js";
23
23
  export {
24
24
  DEFAULT_BODY_CHARS,
@@ -50,6 +50,12 @@ export interface ToolsOptions {
50
50
  }
51
51
  /** What `next` says when the hint a tool wrote names a tool that is not on offer. */
52
52
  export declare const NEXT_FALLBACK = "Pick another of the listed tools to go further.";
53
+ /**
54
+ * Why `createTools` leaves a built-in tool out of this instance's set, in
55
+ * the words of an `Unsupported` error. `undefined` for a name that is not a
56
+ * built-in tool, or one the instance offers.
57
+ */
58
+ export declare const leftOutReason: (outbound: OutboundApi, name: string) => string | undefined;
53
59
  /**
54
60
  * The tool set for one instance. A tool that needs a plugin the instance does
55
61
  * not have, or a capability the adapter lacks or a plugin turned off, is left
@@ -25,6 +25,8 @@ export interface ToolSuccess {
25
25
  readonly complete: boolean;
26
26
  /** What to know before trusting the answer, for example what was left out. */
27
27
  readonly notes: readonly string[];
28
+ /** Set by `outbound mcp` when the call waited long on rate limits: the milliseconds it waited. */
29
+ readonly throttledMs?: number | undefined;
28
30
  };
29
31
  /** What to ask next. */
30
32
  readonly next: string;
@@ -44,6 +46,8 @@ export interface ToolFailure {
44
46
  /** Set when the tool sent vendor requests before it failed. */
45
47
  readonly meta?: {
46
48
  readonly requests: number;
49
+ /** Set by `outbound mcp` when the call waited long on rate limits. */
50
+ readonly throttledMs?: number | undefined;
47
51
  } | undefined;
48
52
  readonly next: string;
49
53
  }
@@ -103,6 +107,6 @@ export declare const capNext: (cap: number, isDefault: boolean, lower?: {
103
107
  readonly input: string;
104
108
  readonly to: number;
105
109
  readonly sure: boolean;
106
- }) => string;
110
+ }, setting?: string) => string;
107
111
  /** A thrown error as a tool result. `requests` is what the call sent before it. */
108
112
  export declare const failure: (cause: unknown, requests?: number, next?: string) => ToolFailure;
@@ -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/tracing/index.ts
@@ -1,31 +1,31 @@
1
1
  import {
2
2
  instantlyEvents
3
- } from "../chunks/chunk-7I3EPR23.js";
3
+ } from "../chunks/chunk-MPE6VLLY.js";
4
4
  import {
5
5
  smartleadEvents
6
- } from "../chunks/chunk-KTYTE2BU.js";
6
+ } from "../chunks/chunk-UAHYPASH.js";
7
7
  import {
8
8
  heyreachEvents
9
- } from "../chunks/chunk-LD6F46UT.js";
9
+ } from "../chunks/chunk-UWD65SK7.js";
10
10
  import {
11
11
  emailbisonEvents
12
- } from "../chunks/chunk-I7DXXGNZ.js";
13
- import "../chunks/chunk-OK3GAZMT.js";
14
- import "../chunks/chunk-BNDHEDHD.js";
12
+ } from "../chunks/chunk-UZLFZZ2U.js";
13
+ import "../chunks/chunk-SYUMA3CP.js";
14
+ import "../chunks/chunk-UOJG4VYF.js";
15
15
  import "../chunks/chunk-FALWG5U3.js";
16
- import "../chunks/chunk-LVZGIKNF.js";
16
+ import "../chunks/chunk-U5AK6OJM.js";
17
17
  import "../chunks/chunk-POBAY3TI.js";
18
18
  import {
19
19
  SCHEMA_VERSION
20
20
  } from "../chunks/chunk-QGRZDTX4.js";
21
- import "../chunks/chunk-YW6FFVSZ.js";
22
- import "../chunks/chunk-NAWZ73QS.js";
21
+ import "../chunks/chunk-HXB2IOJJ.js";
22
+ import "../chunks/chunk-YFJ3OQZS.js";
23
23
  import {
24
24
  stableId
25
- } from "../chunks/chunk-FHKSLCVW.js";
25
+ } from "../chunks/chunk-KVAG5GM2.js";
26
26
  import {
27
27
  OutboundError
28
- } from "../chunks/chunk-QFC4ZHD3.js";
28
+ } from "../chunks/chunk-XYHM4KHC.js";
29
29
  import {
30
30
  parseJson
31
31
  } from "../chunks/chunk-45TXPJW7.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "outbound-sdk",
3
- "version": "0.7.1",
3
+ "version": "0.9.0",
4
4
  "description": "One small, typed, read-only API over outbound sending tools.",
5
5
  "keywords": [
6
6
  "cold-email",