outbound-sdk 0.11.0 → 0.13.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.
- package/dist/alerts/index.js +1 -1
- package/dist/budget/index.js +1 -1
- package/dist/cards/index.js +217 -100
- package/dist/cards/sender-tool-cards.d.ts +6 -0
- package/dist/chunks/{chunk-UAHYPASH.js → chunk-3LRIWQEJ.js} +2 -1
- package/dist/chunks/{chunk-UZLFZZ2U.js → chunk-6BSFR5SF.js} +14 -2
- package/dist/chunks/{chunk-FTK4JS65.js → chunk-BTIJ24UY.js} +89 -9
- package/dist/chunks/{chunk-OVTYA3IB.js → chunk-EAG5NIPM.js} +614 -206
- package/dist/chunks/{chunk-A7DLJUA6.js → chunk-FT6HMMMP.js} +3 -1
- package/dist/chunks/chunk-I7GBBHD2.js +80 -0
- package/dist/chunks/{chunk-UOJG4VYF.js → chunk-LD5OAELW.js} +1 -1
- package/dist/chunks/{chunk-KMQHXFIZ.js → chunk-LJNU4LAR.js} +2094 -1014
- package/dist/chunks/{chunk-POBAY3TI.js → chunk-NLYGMVXS.js} +30 -0
- package/dist/chunks/{chunk-V7JKTNRO.js → chunk-OE45PREW.js} +1 -1
- package/dist/chunks/{chunk-MEEJIIIA.js → chunk-OP2GL7ZT.js} +77 -8
- package/dist/chunks/{chunk-YFJ3OQZS.js → chunk-OPLXELPS.js} +5 -1
- package/dist/chunks/{chunk-CVLGFVDC.js → chunk-PDYE6CWS.js} +136 -64
- package/dist/chunks/{chunk-OMCDMELK.js → chunk-PUIHJFK4.js} +1 -1
- package/dist/chunks/{chunk-MPE6VLLY.js → chunk-UZ4YWUZ7.js} +1 -1
- package/dist/chunks/{tools-AVJ3XJ5A.js → tools-VCCH3JNL.js} +13 -6
- package/dist/cli/bin.js +11 -10
- package/dist/cli/config.d.ts +0 -2
- package/dist/cli/index.js +10 -9
- package/dist/cli/offered.d.ts +31 -2
- package/dist/cli/serve.d.ts +4 -2
- package/dist/combine/index.js +60 -4
- package/dist/emailbison/index.js +4 -4
- package/dist/fixtures/index.js +4 -4
- package/dist/heyreach/index.js +17 -6
- package/dist/identity/index.js +46 -11
- package/dist/identity/keys.d.ts +1 -1
- package/dist/index.js +8 -6
- package/dist/insights/capped.d.ts +14 -1
- package/dist/insights/define.d.ts +8 -6
- package/dist/insights/index.d.ts +1 -1
- package/dist/insights/index.js +12 -61
- package/dist/insights/inputs.generated.d.ts +91 -16
- package/dist/insights/ops/campaign-ranking.d.ts +8 -1
- package/dist/insights/ops/channel-mix.d.ts +8 -1
- package/dist/insights/ops/client-report.d.ts +28 -18
- package/dist/insights/ops/client-runway.d.ts +43 -0
- package/dist/insights/ops/index.d.ts +6 -1
- package/dist/insights/ops/period-comparison.d.ts +35 -2
- package/dist/insights/ops/pipeline-forecast.d.ts +14 -9
- package/dist/insights/ops/shared.d.ts +49 -2
- package/dist/insights/ops/tag-rollup.d.ts +8 -1
- package/dist/insights/people/coverage.d.ts +26 -0
- package/dist/insights/people/dropped-replies-check.d.ts +19 -3
- package/dist/insights/people/dropped-replies.d.ts +6 -2
- package/dist/insights/people/find.d.ts +5 -4
- package/dist/insights/people/hot-leads.d.ts +10 -1
- package/dist/insights/people/index.d.ts +26 -2
- package/dist/insights/people/lead-collisions.d.ts +18 -1
- package/dist/insights/people/person-summary.d.ts +15 -3
- package/dist/insights/people/suppression-check.d.ts +18 -1
- package/dist/insights/people/thread-context.d.ts +79 -0
- package/dist/insights/people/thread-contexts.d.ts +59 -0
- package/dist/insights/people/thread-read.d.ts +33 -0
- package/dist/insights/registry.d.ts +29 -3
- package/dist/insights/senders/domain-health.d.ts +1 -1
- package/dist/insights/senders/index.d.ts +1 -1
- package/dist/insights/senders/read.d.ts +9 -0
- package/dist/insights/tools.d.ts +35 -2
- package/dist/instantly/adapter.d.ts +3 -2
- package/dist/instantly/capabilities.d.ts +5 -0
- package/dist/instantly/index.js +255 -66
- package/dist/instantly/lead-ids.d.ts +11 -0
- package/dist/instantly/map-lead.d.ts +19 -2
- package/dist/instantly/senders.d.ts +3 -0
- package/dist/internal/adapter.d.ts +7 -0
- package/dist/internal/capabilities.d.ts +8 -0
- package/dist/internal/entities.d.ts +24 -1
- package/dist/internal/fields.d.ts +10 -0
- package/dist/internal/outbound/api.d.ts +12 -0
- package/dist/internal/outbound/operations-account.d.ts +4 -1
- package/dist/internal/outbound/outbound.d.ts +2 -1
- package/dist/internal/outbound/specs-account.d.ts +2 -1
- package/dist/internal/person.d.ts +32 -0
- package/dist/internal/records.d.ts +2 -2
- package/dist/internal/reply-people.d.ts +25 -7
- package/dist/internal/runway.d.ts +38 -5
- package/dist/internal/url.d.ts +2 -1
- package/dist/loader/index.js +1 -1
- package/dist/memory/data.d.ts +2 -1
- package/dist/memory/index.js +6 -4
- package/dist/redact/index.d.ts +1 -1
- package/dist/redact/index.js +62 -31
- package/dist/redact/plugin.d.ts +13 -11
- package/dist/redact/tokens.d.ts +18 -1
- package/dist/smartlead/index.js +21 -7
- package/dist/tools/account-tools.d.ts +0 -5
- package/dist/tools/ai-sdk.js +5 -3
- package/dist/tools/campaign-tools.d.ts +0 -4
- package/dist/tools/claude-agent.js +5 -3
- package/dist/tools/deliverability-check.d.ts +9 -0
- package/dist/tools/index.js +6 -4
- package/dist/tools/people-tools.d.ts +4 -1
- package/dist/tools/person-input.d.ts +17 -0
- package/dist/tools/registry.d.ts +8 -1
- package/dist/tools/sender-health.d.ts +8 -0
- package/dist/tools/sender-impact.d.ts +38 -0
- package/dist/tools/shared.d.ts +5 -0
- package/dist/webhooks/index.js +6 -6
- package/package.json +1 -1
- /package/dist/chunks/{chunk-5XLR6XVV.js → chunk-HNYJO6B4.js} +0 -0
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { InsightEntry } from "./define.ts";
|
|
2
2
|
export declare const INSIGHTS: readonly [import("./define.ts").InsightDefinition<"personSummary", {
|
|
3
3
|
max_campaigns: number;
|
|
4
|
-
|
|
4
|
+
email?: string | undefined;
|
|
5
|
+
lead_ref?: string | undefined;
|
|
6
|
+
linkedin_url?: string | undefined;
|
|
7
|
+
person?: string | undefined;
|
|
5
8
|
}, import("./people/person-summary.ts").PersonSummary, {
|
|
6
|
-
|
|
9
|
+
email?: string | undefined;
|
|
10
|
+
lead_ref?: string | undefined;
|
|
11
|
+
linkedin_url?: string | undefined;
|
|
12
|
+
person?: string | undefined;
|
|
7
13
|
max_campaigns?: number | undefined;
|
|
8
14
|
}>, import("./define.ts").InsightDefinition<"accountSummary", {
|
|
9
15
|
allow_free_domains: boolean;
|
|
@@ -62,6 +68,7 @@ export declare const INSIGHTS: readonly [import("./define.ts").InsightDefinition
|
|
|
62
68
|
max_age_days: number;
|
|
63
69
|
include_engagement_only: boolean;
|
|
64
70
|
positive_labels: string[];
|
|
71
|
+
read_threads: boolean;
|
|
65
72
|
recency_days: number;
|
|
66
73
|
weight_click: number;
|
|
67
74
|
weight_interest: number;
|
|
@@ -77,12 +84,27 @@ export declare const INSIGHTS: readonly [import("./define.ts").InsightDefinition
|
|
|
77
84
|
max_age_days?: number | undefined;
|
|
78
85
|
include_engagement_only?: boolean | undefined;
|
|
79
86
|
positive_labels?: string[] | undefined;
|
|
87
|
+
read_threads?: boolean | undefined;
|
|
80
88
|
recency_days?: number | undefined;
|
|
81
89
|
weight_click?: number | undefined;
|
|
82
90
|
weight_interest?: number | undefined;
|
|
83
91
|
weight_open?: number | undefined;
|
|
84
92
|
weight_recency?: number | undefined;
|
|
85
93
|
weight_reply?: number | undefined;
|
|
94
|
+
}>, import("./define.ts").InsightDefinition<"threadContext", {
|
|
95
|
+
bodies: "none" | "snippet" | null;
|
|
96
|
+
cursor: string | null;
|
|
97
|
+
leads: string[];
|
|
98
|
+
max_messages: number;
|
|
99
|
+
page_size: number;
|
|
100
|
+
threads: string[];
|
|
101
|
+
}, import("./people/thread-contexts.ts").ThreadContexts, {
|
|
102
|
+
bodies?: "none" | "snippet" | null | undefined;
|
|
103
|
+
cursor?: string | null | undefined;
|
|
104
|
+
leads?: string[] | undefined;
|
|
105
|
+
max_messages?: number | undefined;
|
|
106
|
+
page_size?: number | undefined;
|
|
107
|
+
threads?: string[] | undefined;
|
|
86
108
|
}>, import("./define.ts").InsightDefinition<"personalizationGaps", {
|
|
87
109
|
campaign: string;
|
|
88
110
|
limit: number;
|
|
@@ -168,8 +190,8 @@ export declare const INSIGHTS: readonly [import("./define.ts").InsightDefinition
|
|
|
168
190
|
since?: string | null | undefined;
|
|
169
191
|
timezone_offset_minutes?: number | undefined;
|
|
170
192
|
}>, import("./define.ts").InsightDefinition<"domainHealth", {
|
|
171
|
-
max_senders: number;
|
|
172
193
|
max_spam_rate: number;
|
|
194
|
+
max_senders?: number | undefined;
|
|
173
195
|
}, import("./senders/domain-health.ts").DomainHealth, {
|
|
174
196
|
max_senders?: number | undefined;
|
|
175
197
|
max_spam_rate?: number | undefined;
|
|
@@ -352,6 +374,8 @@ export declare const INSIGHTS: readonly [import("./define.ts").InsightDefinition
|
|
|
352
374
|
runway_days: number;
|
|
353
375
|
max_campaigns: number;
|
|
354
376
|
statuses: ("active" | "archived" | "completed" | "draft" | "paused" | "unknown")[];
|
|
377
|
+
provider?: string | undefined;
|
|
378
|
+
tag?: string | undefined;
|
|
355
379
|
}, import("./ops/client-report.ts").ClientReport, {
|
|
356
380
|
alpha?: number | undefined;
|
|
357
381
|
anomaly_threshold?: number | undefined;
|
|
@@ -362,7 +386,9 @@ export declare const INSIGHTS: readonly [import("./define.ts").InsightDefinition
|
|
|
362
386
|
max_leads_per_campaign?: number | undefined;
|
|
363
387
|
min_baseline_points?: number | undefined;
|
|
364
388
|
min_sent?: number | undefined;
|
|
389
|
+
provider?: string | undefined;
|
|
365
390
|
runway_days?: number | undefined;
|
|
391
|
+
tag?: string | undefined;
|
|
366
392
|
max_campaigns?: number | undefined;
|
|
367
393
|
statuses?: ("active" | "archived" | "completed" | "draft" | "paused" | "unknown")[] | undefined;
|
|
368
394
|
}>];
|
|
@@ -60,8 +60,8 @@ export interface DomainHealth {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
export declare const domainHealth: import("../define.ts").InsightDefinition<"domainHealth", {
|
|
63
|
-
max_senders: number;
|
|
64
63
|
max_spam_rate: number;
|
|
64
|
+
max_senders?: number | undefined;
|
|
65
65
|
}, DomainHealth, {
|
|
66
66
|
max_senders?: number | undefined;
|
|
67
67
|
max_spam_rate?: number | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const SENDERS_INSIGHTS: readonly [import("../define.ts").InsightDefinition<"domainHealth", {
|
|
2
|
-
max_senders: number;
|
|
3
2
|
max_spam_rate: number;
|
|
3
|
+
max_senders?: number | undefined;
|
|
4
4
|
}, import("./domain-health.ts").DomainHealth, {
|
|
5
5
|
max_senders?: number | undefined;
|
|
6
6
|
max_spam_rate?: number | undefined;
|
|
@@ -14,6 +14,15 @@ export declare const readSenders: (context: InsightContext, max: number) => Prom
|
|
|
14
14
|
* naming it, and the answer is marked incomplete. Any other error throws.
|
|
15
15
|
*/
|
|
16
16
|
export declare const readHealth: (context: InsightContext, sender: Sender) => Promise<SenderHealth | null>;
|
|
17
|
+
/**
|
|
18
|
+
* Every sender's health from `senderHealth`, a page at a time, matched to
|
|
19
|
+
* the senders read. A sender the listing did not return is left out, with
|
|
20
|
+
* one note counting them, and the answer is marked incomplete.
|
|
21
|
+
*/
|
|
22
|
+
export declare const readHealthInPages: (context: InsightContext, senders: readonly Sender[], max: number) => Promise<{
|
|
23
|
+
readonly health: SenderHealth | null;
|
|
24
|
+
readonly sender: Sender;
|
|
25
|
+
}[]>;
|
|
17
26
|
/** The part after the `@`, lowercased. `null` for a LinkedIn seat. */
|
|
18
27
|
export declare const domainOf: (address: string | null) => string | null;
|
|
19
28
|
export declare const DNS_RECORDS: readonly ["spf", "dkim", "dmarc", "mx"];
|
package/dist/insights/tools.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { Json } from "../internal/json.ts";
|
|
1
2
|
import type { OutboundApi } from "../internal/outbound/api.ts";
|
|
2
3
|
import type { OutboundTool } from "../tools/index.ts";
|
|
4
|
+
import type { InsightResult, RunOptions } from "./define.ts";
|
|
3
5
|
export interface InsightToolsOptions {
|
|
4
6
|
/** Offer only these insights, by tool name. Defaults to every one the adapter can serve. */
|
|
5
7
|
readonly only?: readonly string[] | undefined;
|
|
@@ -17,23 +19,54 @@ export interface InsightToolsOptions {
|
|
|
17
19
|
* its own, as `outbound mcp` names `--max-requests`.
|
|
18
20
|
*/
|
|
19
21
|
readonly capSetting?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* On a combined instance, each of its tools as its own instance, as
|
|
24
|
+
* `outbound.workspace("provider:workspace")` gives them (`membersOf`).
|
|
25
|
+
* With them an insight that only some tools can serve is offered too: one
|
|
26
|
+
* that takes a campaign answers for the campaigns of the tools that serve
|
|
27
|
+
* it and refuses the others' before any request, and one that reads every
|
|
28
|
+
* campaign answers for the one tool that serves it, marked incomplete.
|
|
29
|
+
*/
|
|
30
|
+
readonly members?: readonly OutboundApi[] | undefined;
|
|
20
31
|
}
|
|
21
32
|
/** The most an insight tool call may send when no cap is set, whatever its input. */
|
|
22
33
|
export declare const INSIGHT_TOOL_CEILING = 500;
|
|
34
|
+
/** Each tool of a combined instance as its own instance; none for any other instance. */
|
|
35
|
+
export declare const membersOf: (outbound: OutboundApi) => Promise<OutboundApi[]>;
|
|
36
|
+
/** Where an insight runs on this instance, and the tools of a combined one that can serve it. */
|
|
37
|
+
interface Placement {
|
|
38
|
+
/** The instance the insight runs on: this one, or the one tool that serves it. */
|
|
39
|
+
readonly target: OutboundApi;
|
|
40
|
+
/** On a combined instance the insight cannot serve as a whole, the tools that can. */
|
|
41
|
+
readonly servers: readonly OutboundApi[];
|
|
42
|
+
}
|
|
43
|
+
/** The insight entry by its tool name, and where it runs here; `undefined` when it is no insight or cannot run. */
|
|
44
|
+
export declare const insightPlacement: (outbound: OutboundApi, name: string, members: readonly OutboundApi[]) => (Placement & {
|
|
45
|
+
readonly note: string | null;
|
|
46
|
+
}) | undefined;
|
|
23
47
|
/**
|
|
24
48
|
* Why `insightTools` leaves an insight out on this instance, in the words of
|
|
25
49
|
* an `Unsupported` error. `undefined` for a name that is no insight, or one
|
|
26
50
|
* the instance offers.
|
|
27
51
|
*/
|
|
28
|
-
export declare const insightLeftOutReason: (outbound: OutboundApi, name: string) => string | undefined;
|
|
52
|
+
export declare const insightLeftOutReason: (outbound: OutboundApi, name: string, members?: readonly OutboundApi[]) => string | undefined;
|
|
29
53
|
/**
|
|
30
54
|
* The insights this instance can serve, as tools. An insight whose adapter
|
|
31
55
|
* lacks a capability or a field it needs, or that cannot match records while the redact
|
|
32
56
|
* plugin masks what it matches on, is left out, so a model is never offered a
|
|
33
|
-
* tool that cannot work
|
|
57
|
+
* tool that cannot work; on a combined instance, `members` brings back what
|
|
58
|
+
* one of its tools can serve. A `next` hint naming a left-out insight is
|
|
59
|
+
* dropped, in the tool's `next` and in every `next` its answer holds.
|
|
34
60
|
*
|
|
35
61
|
* ```ts
|
|
36
62
|
* openaiTools(outbound, { extra: insightTools(outbound) });
|
|
37
63
|
* ```
|
|
38
64
|
*/
|
|
39
65
|
export declare const insightTools: (outbound: OutboundApi, options?: InsightToolsOptions) => OutboundTool[];
|
|
66
|
+
/**
|
|
67
|
+
* Runs the insight where it runs here: on a combined instance, one that only
|
|
68
|
+
* one of its tools serves runs on that tool, its answer marked incomplete
|
|
69
|
+
* with a note naming the others.
|
|
70
|
+
*/
|
|
71
|
+
export declare const runPlaced: (outbound: OutboundApi, name: string, input: Json | undefined, members: readonly OutboundApi[], options?: RunOptions) => Promise<InsightResult<Json>>;
|
|
72
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import type { Adapter } from "../internal/adapter.ts";
|
|
|
2
2
|
import { accountReaders } from "./adapter-account.ts";
|
|
3
3
|
import { mailReaders } from "./adapter-mail.ts";
|
|
4
4
|
import type { InstantlyClient } from "./client.ts";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { senderReaders } from "./senders.ts";
|
|
6
|
+
type Readers = Pick<Adapter, "getCampaign" | "getLead" | "getSender" | "getSequence" | "listCampaigns" | "listLeads" | "listWorkspaces" | "stats">;
|
|
7
|
+
export declare const readers: (client: InstantlyClient) => Readers & ReturnType<typeof accountReaders> & ReturnType<typeof mailReaders> & ReturnType<typeof senderReaders>;
|
|
7
8
|
export {};
|