outbound-sdk 0.2.1 → 0.5.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/README.md +2 -2
- package/dist/alerts/check-evaluate.d.ts +53 -0
- package/dist/alerts/check-measure.d.ts +100 -0
- package/dist/alerts/check-schema.d.ts +184 -0
- package/dist/alerts/check-validate.d.ts +18 -0
- package/dist/alerts/index.d.ts +7 -0
- package/dist/alerts/index.js +684 -20
- package/dist/alerts/plugin.d.ts +20 -3
- package/dist/audit/index.js +2 -2
- package/dist/benchmarks/index.js +5 -5
- package/dist/budget/index.d.ts +5 -2
- package/dist/budget/index.js +12 -10
- package/dist/cards/content.d.ts +6 -1
- package/dist/cards/format.d.ts +17 -2
- package/dist/cards/index.d.ts +1 -1
- package/dist/cards/index.js +298 -132
- package/dist/cards/parts.d.ts +9 -2
- package/dist/cards/render.d.ts +20 -3
- package/dist/chunks/{chunk-U2D34ARZ.js → chunk-2D42TQFU.js} +3 -3
- package/dist/chunks/{chunk-6CVZOUHB.js → chunk-3S32R2MH.js} +53 -63
- package/dist/chunks/chunk-4PA526S7.js +17 -0
- package/dist/chunks/{chunk-RCZ7ZZFU.js → chunk-5J7GGV62.js} +12 -5
- package/dist/chunks/chunk-6TKFISG4.js +676 -0
- package/dist/chunks/{chunk-AFU5E5QB.js → chunk-BK5SLY32.js} +104 -84
- package/dist/chunks/{chunk-VQSCHOBV.js → chunk-BLCJHP5H.js} +11 -4
- package/dist/chunks/{chunk-SBIZDCRY.js → chunk-BN6WCAWX.js} +7 -7
- package/dist/chunks/{chunk-4PSO6JEK.js → chunk-BOWXGMN3.js} +6 -21
- package/dist/chunks/{chunk-PURHK3JU.js → chunk-EHSJGQ5K.js} +8 -8
- package/dist/chunks/{chunk-IPUYZD4O.js → chunk-GFDNRWR3.js} +1 -1
- package/dist/chunks/chunk-HPNGSG5E.js +51 -0
- package/dist/chunks/chunk-HWHI4LFY.js +102 -0
- package/dist/chunks/{chunk-E7JHLNLG.js → chunk-J7DDZ4C2.js} +15 -2
- package/dist/chunks/{chunk-DJ2IUQEU.js → chunk-JWGSB7PT.js} +6 -6
- package/dist/chunks/{chunk-R3Y56YVF.js → chunk-OLPMBRXM.js} +4 -3
- package/dist/chunks/{chunk-YOTW5ESM.js → chunk-PQSTQKRD.js} +2 -2
- package/dist/chunks/chunk-PTZO4QXR.js +15 -0
- package/dist/chunks/{chunk-LVYG7XZJ.js → chunk-QAKJ76HB.js} +1 -1
- package/dist/chunks/chunk-QGRZDTX4.js +26 -0
- package/dist/chunks/chunk-WGW3ROLY.js +18 -0
- package/dist/chunks/{chunk-XC6CZP73.js → chunk-WH6V3YNN.js} +32 -1
- package/dist/chunks/{chunk-P3IJBJUI.js → chunk-X4RDBD4J.js} +296 -62
- package/dist/chunks/chunk-XL6LJVHJ.js +71 -0
- package/dist/chunks/{chunk-XNFESPZH.js → chunk-YYCT3NGV.js} +200 -39
- package/dist/chunks/{chunk-UAT3JSJZ.js → chunk-ZOAG2C6V.js} +2 -2
- package/dist/cli/bin.js +19 -30
- package/dist/cli/commands.d.ts +11 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +18 -13
- package/dist/cli/mcp.d.ts +5 -0
- package/dist/cli/update.d.ts +15 -0
- package/dist/clients/index.d.ts +1 -1
- package/dist/clients/index.js +35 -10
- package/dist/clients/plugin.d.ts +9 -2
- package/dist/combine/index.js +7 -6
- package/dist/emailbison/account.d.ts +7 -0
- package/dist/emailbison/adapter.d.ts +5 -0
- package/dist/emailbison/capabilities.d.ts +78 -0
- package/dist/emailbison/client.d.ts +29 -0
- package/dist/emailbison/index.d.ts +30 -0
- package/dist/emailbison/index.js +1017 -0
- package/dist/emailbison/mail.d.ts +5 -0
- package/dist/emailbison/map-mail.d.ts +13 -0
- package/dist/emailbison/map-sequence.d.ts +12 -0
- package/dist/emailbison/map-stats.d.ts +47 -0
- package/dist/emailbison/map.d.ts +24 -0
- package/dist/emailbison/native-params.d.ts +5 -0
- package/dist/emailbison/native-workspace.d.ts +167 -0
- package/dist/emailbison/native.d.ts +327 -0
- package/dist/emailbison/stats.d.ts +4 -0
- package/dist/emailbison/webhooks.d.ts +2 -0
- package/dist/exporter/index.d.ts +5 -2
- package/dist/exporter/index.js +2 -2
- package/dist/failover/index.js +3 -3
- package/dist/fixtures/index.js +10 -9
- package/dist/heyreach/capabilities.d.ts +3 -0
- package/dist/heyreach/client.d.ts +2 -0
- package/dist/heyreach/index.js +83 -51
- package/dist/heyreach/map.d.ts +5 -2
- package/dist/identity/index.js +33 -17
- package/dist/identity/plugin.d.ts +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +29 -25
- package/dist/insights/campaign.d.ts +3 -0
- package/dist/insights/capped.d.ts +29 -0
- package/dist/insights/copy/copy-audit.d.ts +2 -0
- package/dist/insights/copy/copy-reuse.d.ts +27 -3
- package/dist/insights/copy/index.d.ts +8 -8
- package/dist/insights/copy/reply-timing.d.ts +8 -0
- package/dist/insights/copy/reuse-base.d.ts +32 -0
- package/dist/insights/copy/shared.d.ts +39 -15
- package/dist/insights/copy/step-funnel.d.ts +16 -5
- package/dist/insights/copy/variant-test.d.ts +19 -8
- package/dist/insights/cost.d.ts +91 -0
- package/dist/insights/define.d.ts +78 -3
- package/dist/insights/fields.d.ts +16 -0
- package/dist/insights/index.d.ts +6 -4
- package/dist/insights/index.js +1816 -748
- package/dist/insights/inputs.generated.d.ts +951 -0
- package/dist/insights/ops/campaign-diagnosis.d.ts +3 -1
- package/dist/insights/ops/campaign-ranking.d.ts +15 -7
- package/dist/insights/ops/channel-mix.d.ts +2 -1
- package/dist/insights/ops/client-report.d.ts +18 -5
- package/dist/insights/ops/index.d.ts +8 -4
- package/dist/insights/ops/period-comparison.d.ts +14 -3
- package/dist/insights/ops/pipeline-forecast.d.ts +14 -4
- package/dist/insights/ops/shared.d.ts +39 -24
- package/dist/insights/ops/tag-rollup.d.ts +2 -1
- package/dist/insights/people/account-summary.d.ts +13 -0
- package/dist/insights/people/dropped-replies.d.ts +8 -0
- package/dist/insights/people/find.d.ts +7 -1
- package/dist/insights/people/hot-leads.d.ts +16 -1
- package/dist/insights/people/person-summary.d.ts +6 -0
- package/dist/insights/people/read.d.ts +26 -10
- package/dist/insights/people/suppression-check.d.ts +11 -2
- package/dist/insights/plugin.d.ts +26 -5
- package/dist/insights/ref.d.ts +6 -0
- package/dist/insights/registry.d.ts +30 -18
- package/dist/insights/run-cap.d.ts +35 -0
- package/dist/insights/senders/bounce-watch.d.ts +25 -8
- package/dist/insights/senders/capacity-sends.d.ts +22 -0
- package/dist/insights/senders/domain-health.d.ts +10 -4
- package/dist/insights/senders/index.d.ts +14 -6
- package/dist/insights/senders/read.d.ts +15 -14
- package/dist/insights/senders/sender-capacity.d.ts +5 -13
- package/dist/insights/senders/sender-load.d.ts +2 -0
- package/dist/insights/stats.d.ts +8 -0
- package/dist/insights/tools.d.ts +13 -2
- package/dist/instantly/capabilities.d.ts +13 -0
- package/dist/instantly/client.d.ts +2 -0
- package/dist/instantly/index.js +77 -49
- package/dist/instantly/map.d.ts +6 -2
- package/dist/internal/adapter.d.ts +12 -0
- package/dist/internal/engine/request.d.ts +5 -0
- package/dist/internal/entities.d.ts +3 -20
- package/dist/internal/errors.d.ts +44 -0
- package/dist/internal/fields.d.ts +1 -1
- package/dist/internal/json.d.ts +9 -2
- package/dist/internal/lists.d.ts +24 -0
- package/dist/internal/numbers.d.ts +8 -0
- package/dist/internal/outbound/collections.d.ts +4 -0
- package/dist/internal/outbound/create.d.ts +24 -3
- package/dist/internal/outbound/outbound.d.ts +18 -2
- package/dist/internal/outbound/validate.d.ts +4 -0
- package/dist/internal/outbound/walker.d.ts +3 -2
- package/dist/internal/plural.d.ts +12 -0
- package/dist/internal/renamed.d.ts +28 -0
- package/dist/internal/request-cap.d.ts +35 -0
- package/dist/internal/vocabulary.d.ts +20 -0
- package/dist/loader/index.js +5 -5
- package/dist/memory/adapter.d.ts +7 -0
- package/dist/memory/demo-stats.d.ts +3 -0
- package/dist/memory/demo.d.ts +14 -3
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/index.js +209 -104
- package/dist/providers/index.d.ts +92 -0
- package/dist/providers/index.js +3 -1
- package/dist/reconcile/index.js +5 -4
- package/dist/redact/index.js +13 -7
- package/dist/redact/plugin.d.ts +7 -0
- package/dist/smartlead/capabilities.d.ts +5 -0
- package/dist/smartlead/index.js +119 -66
- package/dist/smartlead/shared.d.ts +13 -0
- package/dist/sync/index.js +2 -2
- package/dist/tools/ai-sdk.js +10 -6
- package/dist/tools/campaign-tools.d.ts +1 -1
- package/dist/tools/claude-agent.js +10 -6
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +16 -9
- package/dist/tools/input-problem.d.ts +8 -0
- package/dist/tools/registry.d.ts +26 -2
- package/dist/tools/shared.d.ts +27 -1
- package/dist/tracing/index.js +2 -2
- package/dist/webhooks/index.js +22 -12
- package/package.json +8 -2
- package/dist/chunks/chunk-FKH5N47I.js +0 -40
|
@@ -2,11 +2,8 @@ import {
|
|
|
2
2
|
defaultRateLimitStore
|
|
3
3
|
} from "./chunk-4O2HRTTI.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
sha256Hex
|
|
9
|
-
} from "./chunk-FHKSLCVW.js";
|
|
5
|
+
CAPPED
|
|
6
|
+
} from "./chunk-HPNGSG5E.js";
|
|
10
7
|
import {
|
|
11
8
|
CAPABILITY_KEYS,
|
|
12
9
|
blockEntrySchema,
|
|
@@ -21,7 +18,10 @@ import {
|
|
|
21
18
|
senderHealthSchema,
|
|
22
19
|
tagSchema,
|
|
23
20
|
webhookSubscriptionSchema
|
|
24
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZOAG2C6V.js";
|
|
22
|
+
import {
|
|
23
|
+
plural
|
|
24
|
+
} from "./chunk-PTZO4QXR.js";
|
|
25
25
|
import {
|
|
26
26
|
campaignSchema,
|
|
27
27
|
leadSchema,
|
|
@@ -31,21 +31,28 @@ import {
|
|
|
31
31
|
senderSchema,
|
|
32
32
|
sequenceSchema,
|
|
33
33
|
workspaceSchema
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-BOWXGMN3.js";
|
|
35
35
|
import {
|
|
36
36
|
sourceIdFor
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-QAKJ76HB.js";
|
|
38
|
+
import {
|
|
39
|
+
buildUrl
|
|
40
|
+
} from "./chunk-NAWZ73QS.js";
|
|
41
|
+
import {
|
|
42
|
+
sha256Hex
|
|
43
|
+
} from "./chunk-FHKSLCVW.js";
|
|
38
44
|
import {
|
|
39
45
|
OutboundError,
|
|
40
46
|
redactUrl
|
|
41
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-J7DDZ4C2.js";
|
|
42
48
|
import {
|
|
43
49
|
count,
|
|
44
50
|
field,
|
|
45
51
|
isJsonObject,
|
|
46
52
|
isString,
|
|
47
|
-
parseJson
|
|
48
|
-
|
|
53
|
+
parseJson,
|
|
54
|
+
strayKey
|
|
55
|
+
} from "./chunk-BLCJHP5H.js";
|
|
49
56
|
|
|
50
57
|
// src/internal/limits.ts
|
|
51
58
|
var DEFAULT_CONCURRENCY = 8;
|
|
@@ -273,7 +280,12 @@ var Budget = class {
|
|
|
273
280
|
throw new OutboundError(
|
|
274
281
|
"RateLimited",
|
|
275
282
|
`${provider} rate budget is full and the deadline would pass before it frees up`,
|
|
276
|
-
{
|
|
283
|
+
{
|
|
284
|
+
limit: "deadline",
|
|
285
|
+
provider,
|
|
286
|
+
retryAfterMs: waitMs,
|
|
287
|
+
timedOut: true
|
|
288
|
+
}
|
|
277
289
|
);
|
|
278
290
|
}
|
|
279
291
|
fire(hooks.onThrottle, { lane, provider, waitMs });
|
|
@@ -473,15 +485,17 @@ var attempt = async (spec, environment, attemptNumber) => {
|
|
|
473
485
|
var assertRequestBudget = (environment) => {
|
|
474
486
|
const { adapter, state } = environment;
|
|
475
487
|
if (state.maxRequests !== void 0 && state.requests >= state.maxRequests) {
|
|
488
|
+
const setBy = state.maxRequestsSetBy ?? "maxRequests";
|
|
476
489
|
throw new OutboundError(
|
|
477
490
|
"RateLimited",
|
|
478
|
-
`The call used its budget of ${state.maxRequests
|
|
479
|
-
{ provider: adapter.name }
|
|
491
|
+
`The call used its budget of ${plural(state.maxRequests, "request")} to ${adapter.name}. Raise ${setBy} or ask for less in one call.`,
|
|
492
|
+
{ limit: "call", provider: adapter.name }
|
|
480
493
|
);
|
|
481
494
|
}
|
|
482
495
|
};
|
|
483
496
|
var exhausted = (error, timedOut) => timedOut ? new OutboundError(error.code, error.message, {
|
|
484
497
|
cause: error.cause,
|
|
498
|
+
limit: error.limit,
|
|
485
499
|
provider: error.provider,
|
|
486
500
|
retryAfterMs: error.retryAfterMs,
|
|
487
501
|
status: error.status,
|
|
@@ -575,6 +589,8 @@ var RequestEngine = class {
|
|
|
575
589
|
beforeRequest: void 0,
|
|
576
590
|
deadlineAt: merged.deadline === void 0 ? void 0 : this.now() + merged.deadline,
|
|
577
591
|
maxRequests: merged.maxRequests,
|
|
592
|
+
// A cap from the instance is named by the option that set it there.
|
|
593
|
+
maxRequestsSetBy: options.maxRequests === void 0 && this.#defaults.maxRequests !== void 0 ? "maxRequestsPerCall" : void 0,
|
|
578
594
|
requests: 0,
|
|
579
595
|
retry: resolveRetryPolicy(merged.retries),
|
|
580
596
|
signal: merged.signal,
|
|
@@ -721,11 +737,13 @@ var checked = (core, schema, records, action) => {
|
|
|
721
737
|
// src/internal/outbound/validate.ts
|
|
722
738
|
var DATE = /^\d{4}-\d{2}-\d{2}$/u;
|
|
723
739
|
var invalid = (message) => new OutboundError("Invalid", message);
|
|
740
|
+
var DAY_MS = 864e5;
|
|
724
741
|
var normalizeInstant = (value, name) => {
|
|
725
742
|
if (value === void 0) {
|
|
726
743
|
return void 0;
|
|
727
744
|
}
|
|
728
|
-
const
|
|
745
|
+
const parsed = Date.parse(value);
|
|
746
|
+
const time = name === "until" && DATE.test(value) ? parsed + DAY_MS - 1 : parsed;
|
|
729
747
|
if (Number.isNaN(time)) {
|
|
730
748
|
throw invalid(
|
|
731
749
|
`${name} must be an ISO 8601 date or timestamp, got "${value}"`
|
|
@@ -753,8 +771,20 @@ var assertLimit = (limit) => {
|
|
|
753
771
|
}
|
|
754
772
|
return limit;
|
|
755
773
|
};
|
|
774
|
+
var assertMax = (max) => {
|
|
775
|
+
if (max !== void 0 && (!Number.isInteger(max) || max < 1)) {
|
|
776
|
+
throw invalid(`max must be a positive integer, got ${max}`);
|
|
777
|
+
}
|
|
778
|
+
return max;
|
|
779
|
+
};
|
|
780
|
+
var assertIdIsString = (id, what) => {
|
|
781
|
+
if (typeof id !== "string") {
|
|
782
|
+
throw invalid(`${what} id must be a string, got ${String(id)}`);
|
|
783
|
+
}
|
|
784
|
+
return id;
|
|
785
|
+
};
|
|
756
786
|
var assertId = (id, what) => {
|
|
757
|
-
if (id.trim() === "") {
|
|
787
|
+
if (assertIdIsString(id, what).trim() === "") {
|
|
758
788
|
throw invalid(`${what} id must not be empty`);
|
|
759
789
|
}
|
|
760
790
|
return id;
|
|
@@ -766,6 +796,7 @@ var PageWalker = class {
|
|
|
766
796
|
#cursor;
|
|
767
797
|
#meta;
|
|
768
798
|
#truncated = false;
|
|
799
|
+
#state;
|
|
769
800
|
constructor(options) {
|
|
770
801
|
this.#options = options;
|
|
771
802
|
this.#cursor = options.cursor;
|
|
@@ -780,13 +811,13 @@ var PageWalker = class {
|
|
|
780
811
|
return this.#truncated;
|
|
781
812
|
}
|
|
782
813
|
async *[Symbol.asyncIterator]() {
|
|
783
|
-
const { fetchPage: fetchPage2, keyOf, max } = this.#options;
|
|
814
|
+
const { begin, fetchPage: fetchPage2, keyOf, max } = this.#options;
|
|
784
815
|
const seen = /* @__PURE__ */ new Set();
|
|
785
|
-
|
|
816
|
+
const state = begin();
|
|
817
|
+
this.#state = state;
|
|
786
818
|
let yielded = 0;
|
|
787
819
|
for (; ; ) {
|
|
788
820
|
const fetched = await fetchPage2(this.#cursor, state);
|
|
789
|
-
({ state } = fetched);
|
|
790
821
|
this.#meta = fetched.page.meta;
|
|
791
822
|
for (const item of fetched.page.items) {
|
|
792
823
|
const key = keyOf(item);
|
|
@@ -814,8 +845,28 @@ var PageWalker = class {
|
|
|
814
845
|
}
|
|
815
846
|
async toArray() {
|
|
816
847
|
const items = [];
|
|
817
|
-
|
|
818
|
-
|
|
848
|
+
try {
|
|
849
|
+
for await (const item of this) {
|
|
850
|
+
items.push(item);
|
|
851
|
+
}
|
|
852
|
+
} catch (error) {
|
|
853
|
+
if (!OutboundError.is(error)) {
|
|
854
|
+
throw error;
|
|
855
|
+
}
|
|
856
|
+
throw new OutboundError(error.code, error.message, {
|
|
857
|
+
aborted: error.aborted,
|
|
858
|
+
cause: error,
|
|
859
|
+
limit: error.limit,
|
|
860
|
+
partial: {
|
|
861
|
+
cursor: this.#cursor,
|
|
862
|
+
items,
|
|
863
|
+
requests: this.#state?.requests ?? 0
|
|
864
|
+
},
|
|
865
|
+
provider: error.provider,
|
|
866
|
+
retryAfterMs: error.retryAfterMs,
|
|
867
|
+
status: error.status,
|
|
868
|
+
timedOut: error.timedOut
|
|
869
|
+
});
|
|
819
870
|
}
|
|
820
871
|
return items;
|
|
821
872
|
}
|
|
@@ -823,6 +874,28 @@ var PageWalker = class {
|
|
|
823
874
|
|
|
824
875
|
// src/internal/outbound/collections.ts
|
|
825
876
|
var DEFAULT_BULK_CONCURRENCY = 4;
|
|
877
|
+
var LIST_ALL_KEYS = Object.keys({
|
|
878
|
+
cursor: true,
|
|
879
|
+
deadline: true,
|
|
880
|
+
limit: true,
|
|
881
|
+
max: true,
|
|
882
|
+
maxRequests: true,
|
|
883
|
+
retries: true,
|
|
884
|
+
signal: true,
|
|
885
|
+
timeout: true
|
|
886
|
+
});
|
|
887
|
+
var LIST_KEYS = LIST_ALL_KEYS.filter((key) => key !== "max");
|
|
888
|
+
var refuseUnknown = (spec, options, optionKeys) => {
|
|
889
|
+
const given = Object.entries(options ?? {}).filter(([, value]) => value !== void 0).map(([key]) => key);
|
|
890
|
+
const stray = strayKey(
|
|
891
|
+
[...Object.keys(spec.takes), ...optionKeys],
|
|
892
|
+
given,
|
|
893
|
+
"an option"
|
|
894
|
+
);
|
|
895
|
+
if (stray !== void 0) {
|
|
896
|
+
throw new OutboundError("Invalid", `${spec.action}: ${stray}`);
|
|
897
|
+
}
|
|
898
|
+
};
|
|
826
899
|
var cursorScope = (core, action) => ({
|
|
827
900
|
action,
|
|
828
901
|
provider: core.adapter.name,
|
|
@@ -857,6 +930,7 @@ var fetchPage = (core, spec, request, options, shared) => perform(
|
|
|
857
930
|
);
|
|
858
931
|
var makeReadCollection = (core, spec) => ({
|
|
859
932
|
list: async (options) => {
|
|
933
|
+
refuseUnknown(spec, options, LIST_KEYS);
|
|
860
934
|
const filters = spec.prepare(options ?? {});
|
|
861
935
|
const limit = assertLimit(options?.limit);
|
|
862
936
|
const { page } = await fetchPage(
|
|
@@ -868,10 +942,13 @@ var makeReadCollection = (core, spec) => ({
|
|
|
868
942
|
return page;
|
|
869
943
|
},
|
|
870
944
|
listAll: (options) => {
|
|
945
|
+
refuseUnknown(spec, options, LIST_ALL_KEYS);
|
|
871
946
|
const filters = spec.prepare(options ?? {});
|
|
872
947
|
const limit = assertLimit(options?.limit);
|
|
948
|
+
assertMax(options?.max);
|
|
873
949
|
const walkOptions = options;
|
|
874
950
|
return new PageWalker({
|
|
951
|
+
begin: () => core.engine.begin(options),
|
|
875
952
|
cursor: walkOptions?.cursor,
|
|
876
953
|
fetchPage: (cursor, state) => fetchPage(core, spec, { cursor, filters, limit }, options, state),
|
|
877
954
|
keyOf: (item) => spec.keyOf(item, filters),
|
|
@@ -918,31 +995,39 @@ var makeGetter = (core, spec) => async (id, options) => {
|
|
|
918
995
|
};
|
|
919
996
|
var getMany = async (core, spec, ids, options) => {
|
|
920
997
|
spec.prepare();
|
|
998
|
+
for (const id of ids) {
|
|
999
|
+
assertIdIsString(id, spec.what);
|
|
1000
|
+
}
|
|
921
1001
|
const state = core.engine.begin(options);
|
|
922
|
-
const
|
|
923
|
-
const
|
|
924
|
-
const queue = [...
|
|
1002
|
+
const distinct = [...new Set(ids)];
|
|
1003
|
+
const answers = /* @__PURE__ */ new Map();
|
|
1004
|
+
const queue = [...distinct];
|
|
925
1005
|
const worker = async () => {
|
|
926
1006
|
for (let id = queue.shift(); id !== void 0; id = queue.shift()) {
|
|
927
1007
|
try {
|
|
928
1008
|
const value = await getOne(core, spec, id, options, state, true);
|
|
929
|
-
|
|
1009
|
+
answers.set(id, { value });
|
|
930
1010
|
} catch (error) {
|
|
931
|
-
|
|
1011
|
+
answers.set(id, { error: toOutboundError(core, error) });
|
|
932
1012
|
}
|
|
933
1013
|
}
|
|
934
1014
|
};
|
|
935
1015
|
const workers = Math.max(
|
|
936
1016
|
1,
|
|
937
|
-
Math.min(options?.concurrency ?? DEFAULT_BULK_CONCURRENCY,
|
|
1017
|
+
Math.min(options?.concurrency ?? DEFAULT_BULK_CONCURRENCY, distinct.length)
|
|
938
1018
|
);
|
|
939
1019
|
await Promise.all(Array.from({ length: workers }, worker));
|
|
940
|
-
const
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1020
|
+
const results = [];
|
|
1021
|
+
const errors = [];
|
|
1022
|
+
for (const id of ids) {
|
|
1023
|
+
const answer = answers.get(id);
|
|
1024
|
+
if (answer !== void 0 && "value" in answer) {
|
|
1025
|
+
results.push({ id, value: answer.value });
|
|
1026
|
+
} else if (answer !== void 0) {
|
|
1027
|
+
errors.push({ error: answer.error, id });
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
return { errors, results };
|
|
946
1031
|
};
|
|
947
1032
|
var makeCollection = (core, listSpec, getSpec) => ({
|
|
948
1033
|
...makeReadCollection(core, listSpec),
|
|
@@ -1001,6 +1086,7 @@ var healthGet = (core) => ({
|
|
|
1001
1086
|
});
|
|
1002
1087
|
var subsequenceList = (core) => ({
|
|
1003
1088
|
action: "sequence.subsequences",
|
|
1089
|
+
takes: { campaignId: true },
|
|
1004
1090
|
keyOf: refOf,
|
|
1005
1091
|
prepare: (filters) => {
|
|
1006
1092
|
requireCapability(
|
|
@@ -1023,6 +1109,7 @@ var subsequenceList = (core) => ({
|
|
|
1023
1109
|
});
|
|
1024
1110
|
var listList = (core) => ({
|
|
1025
1111
|
action: "lists.list",
|
|
1112
|
+
takes: {},
|
|
1026
1113
|
keyOf: refOf,
|
|
1027
1114
|
prepare: () => {
|
|
1028
1115
|
requireCapability(core.gate, "lists.list", "Listing lead lists");
|
|
@@ -1051,6 +1138,7 @@ var webhookGet = (core) => ({
|
|
|
1051
1138
|
});
|
|
1052
1139
|
var blocklistList = (core) => ({
|
|
1053
1140
|
action: "blocklist.list",
|
|
1141
|
+
takes: {},
|
|
1054
1142
|
keyOf: refOf,
|
|
1055
1143
|
prepare: () => {
|
|
1056
1144
|
requireCapability(core.gate, "blocklist", "Listing the block list");
|
|
@@ -1061,6 +1149,7 @@ var blocklistList = (core) => ({
|
|
|
1061
1149
|
});
|
|
1062
1150
|
var placementTestList = (core) => ({
|
|
1063
1151
|
action: "placementTests.list",
|
|
1152
|
+
takes: {},
|
|
1064
1153
|
keyOf: refOf,
|
|
1065
1154
|
prepare: () => {
|
|
1066
1155
|
requireCapability(
|
|
@@ -1078,6 +1167,7 @@ var placementTestList = (core) => ({
|
|
|
1078
1167
|
});
|
|
1079
1168
|
var tagList = (core) => ({
|
|
1080
1169
|
action: "tags.list",
|
|
1170
|
+
takes: {},
|
|
1081
1171
|
keyOf: refOf,
|
|
1082
1172
|
prepare: () => {
|
|
1083
1173
|
requireCapability(core.gate, "tags", "Listing tags");
|
|
@@ -1088,6 +1178,7 @@ var tagList = (core) => ({
|
|
|
1088
1178
|
});
|
|
1089
1179
|
var webhookList = (core) => ({
|
|
1090
1180
|
action: "webhooks.list",
|
|
1181
|
+
takes: { campaignId: true },
|
|
1091
1182
|
keyOf: refOf,
|
|
1092
1183
|
prepare: (filters) => {
|
|
1093
1184
|
requireCapability(core.gate, "webhooks.list", "Listing webhooks");
|
|
@@ -1106,6 +1197,7 @@ var hasRange = (filters) => filters.since !== void 0 || filters.until !== void 0
|
|
|
1106
1197
|
var refOf2 = (item) => item.ref;
|
|
1107
1198
|
var campaignList = (core) => ({
|
|
1108
1199
|
action: "campaigns.list",
|
|
1200
|
+
takes: { senderId: true, status: true },
|
|
1109
1201
|
keyOf: refOf2,
|
|
1110
1202
|
prepare: (filters) => {
|
|
1111
1203
|
if (filters.status !== void 0) {
|
|
@@ -1149,6 +1241,7 @@ var sequenceGet = (core) => ({
|
|
|
1149
1241
|
});
|
|
1150
1242
|
var senderList = (core) => ({
|
|
1151
1243
|
action: "senders.list",
|
|
1244
|
+
takes: { campaignId: true },
|
|
1152
1245
|
keyOf: refOf2,
|
|
1153
1246
|
prepare: (filters) => {
|
|
1154
1247
|
if (filters.campaignId === void 0) {
|
|
@@ -1179,6 +1272,14 @@ var senderGet = (core) => ({
|
|
|
1179
1272
|
});
|
|
1180
1273
|
var leadList = (core) => ({
|
|
1181
1274
|
action: "leads.list",
|
|
1275
|
+
takes: {
|
|
1276
|
+
campaignId: true,
|
|
1277
|
+
email: true,
|
|
1278
|
+
linkedinUrl: true,
|
|
1279
|
+
listId: true,
|
|
1280
|
+
since: true,
|
|
1281
|
+
until: true
|
|
1282
|
+
},
|
|
1182
1283
|
// A lookup returns one record per campaign the person is in. On a vendor
|
|
1183
1284
|
// whose lead id is the same in every campaign those records share a ref,
|
|
1184
1285
|
// so the campaign is part of what tells them apart.
|
|
@@ -1237,6 +1338,14 @@ var leadGet = (core) => ({
|
|
|
1237
1338
|
});
|
|
1238
1339
|
var messageList = (core) => ({
|
|
1239
1340
|
action: "messages.list",
|
|
1341
|
+
takes: {
|
|
1342
|
+
campaignId: true,
|
|
1343
|
+
include: true,
|
|
1344
|
+
leadId: true,
|
|
1345
|
+
since: true,
|
|
1346
|
+
threadId: true,
|
|
1347
|
+
until: true
|
|
1348
|
+
},
|
|
1240
1349
|
keyOf: refOf2,
|
|
1241
1350
|
prepare: (filters) => {
|
|
1242
1351
|
requireCapability(core.gate, "messages.list", "Listing messages");
|
|
@@ -1281,6 +1390,14 @@ var messageList = (core) => ({
|
|
|
1281
1390
|
});
|
|
1282
1391
|
var replyList = (core) => ({
|
|
1283
1392
|
action: "replies.list",
|
|
1393
|
+
takes: {
|
|
1394
|
+
campaignId: true,
|
|
1395
|
+
category: true,
|
|
1396
|
+
include: true,
|
|
1397
|
+
since: true,
|
|
1398
|
+
unread: true,
|
|
1399
|
+
until: true
|
|
1400
|
+
},
|
|
1284
1401
|
keyOf: refOf2,
|
|
1285
1402
|
prepare: (filters) => {
|
|
1286
1403
|
requireCapability(core.gate, "replies.list", "Listing replies");
|
|
@@ -1332,6 +1449,7 @@ var replyList = (core) => ({
|
|
|
1332
1449
|
});
|
|
1333
1450
|
var workspaceList = (core) => ({
|
|
1334
1451
|
action: "workspaces.list",
|
|
1452
|
+
takes: {},
|
|
1335
1453
|
keyOf: refOf2,
|
|
1336
1454
|
prepare: () => {
|
|
1337
1455
|
requireCapability(core.gate, "workspaces", "Listing workspaces");
|
|
@@ -2098,10 +2216,29 @@ var makeRawClient = (core, nativeOffBy) => {
|
|
|
2098
2216
|
};
|
|
2099
2217
|
|
|
2100
2218
|
// src/internal/outbound/outbound.ts
|
|
2219
|
+
var warnedMaxRequests = false;
|
|
2220
|
+
var perCallCap = (options) => {
|
|
2221
|
+
if (options.maxRequests === void 0) {
|
|
2222
|
+
return options.maxRequestsPerCall;
|
|
2223
|
+
}
|
|
2224
|
+
if (options.maxRequestsPerCall !== void 0) {
|
|
2225
|
+
throw new OutboundError(
|
|
2226
|
+
"Invalid",
|
|
2227
|
+
"Set maxRequestsPerCall or maxRequests on createOutbound, not both. maxRequests is the old name."
|
|
2228
|
+
);
|
|
2229
|
+
}
|
|
2230
|
+
if (!warnedMaxRequests) {
|
|
2231
|
+
warnedMaxRequests = true;
|
|
2232
|
+
console.warn(
|
|
2233
|
+
"outbound-sdk: maxRequests on createOutbound is deprecated. Rename it to maxRequestsPerCall: it caps each call, not the whole run. For a total, use budget({ maxRequests })."
|
|
2234
|
+
);
|
|
2235
|
+
}
|
|
2236
|
+
return options.maxRequests;
|
|
2237
|
+
};
|
|
2101
2238
|
var engineFor = (options) => new RequestEngine({
|
|
2102
2239
|
defaults: {
|
|
2103
2240
|
deadline: options.deadline,
|
|
2104
|
-
maxRequests: options
|
|
2241
|
+
maxRequests: perCallCap(options),
|
|
2105
2242
|
retries: options.retries,
|
|
2106
2243
|
signal: options.signal,
|
|
2107
2244
|
timeout: options.timeout
|
|
@@ -2118,6 +2255,8 @@ var Outbound = class _Outbound {
|
|
|
2118
2255
|
#core;
|
|
2119
2256
|
#options;
|
|
2120
2257
|
#plugins;
|
|
2258
|
+
// Innermost layers a shared request cap adds; never listed in `plugins`.
|
|
2259
|
+
#layers;
|
|
2121
2260
|
campaigns;
|
|
2122
2261
|
senders;
|
|
2123
2262
|
leads;
|
|
@@ -2131,14 +2270,14 @@ var Outbound = class _Outbound {
|
|
|
2131
2270
|
webhooks;
|
|
2132
2271
|
raw;
|
|
2133
2272
|
native;
|
|
2134
|
-
constructor(options, engine = engineFor(options)) {
|
|
2273
|
+
constructor(options, engine = engineFor(options), layers = []) {
|
|
2135
2274
|
const { adapter } = options;
|
|
2136
2275
|
const plugins = options.plugins ?? [];
|
|
2137
2276
|
assertUniquePluginNames(plugins);
|
|
2138
2277
|
const declared = resolveCapabilities(adapter.capabilities);
|
|
2139
2278
|
const narrowed = narrowCapabilities(declared, plugins);
|
|
2140
2279
|
const run = composeOperations(
|
|
2141
|
-
plugins,
|
|
2280
|
+
[...plugins, ...layers],
|
|
2142
2281
|
(operation, info) => dispatch(
|
|
2143
2282
|
{
|
|
2144
2283
|
adapter,
|
|
@@ -2150,6 +2289,7 @@ var Outbound = class _Outbound {
|
|
|
2150
2289
|
);
|
|
2151
2290
|
this.#options = options;
|
|
2152
2291
|
this.#plugins = plugins;
|
|
2292
|
+
this.#layers = layers;
|
|
2153
2293
|
this.#core = {
|
|
2154
2294
|
adapter,
|
|
2155
2295
|
allowWrites: options.allowWrites ?? false,
|
|
@@ -2258,10 +2398,28 @@ var Outbound = class _Outbound {
|
|
|
2258
2398
|
}
|
|
2259
2399
|
);
|
|
2260
2400
|
}
|
|
2261
|
-
const scoped2 = new _Outbound(
|
|
2401
|
+
const scoped2 = new _Outbound(
|
|
2402
|
+
{ ...this.#options, adapter: member },
|
|
2403
|
+
engine,
|
|
2404
|
+
this.#layers
|
|
2405
|
+
);
|
|
2262
2406
|
installExtensions(scoped2, this.#plugins);
|
|
2263
2407
|
return scoped2;
|
|
2264
2408
|
}
|
|
2409
|
+
/** For a cap shared across calls, as insights and tools use. Not public. */
|
|
2410
|
+
get [CAPPED]() {
|
|
2411
|
+
return {
|
|
2412
|
+
costs: this.#core.adapter.costs,
|
|
2413
|
+
guarded: (layer) => {
|
|
2414
|
+
const copy = new _Outbound(this.#options, this.#core.engine, [
|
|
2415
|
+
...this.#layers,
|
|
2416
|
+
layer
|
|
2417
|
+
]);
|
|
2418
|
+
installExtensions(copy, this.#plugins);
|
|
2419
|
+
return copy;
|
|
2420
|
+
}
|
|
2421
|
+
};
|
|
2422
|
+
}
|
|
2265
2423
|
stats(options) {
|
|
2266
2424
|
return readStats(this.#core, options);
|
|
2267
2425
|
}
|
|
@@ -2281,12 +2439,15 @@ var Outbound = class _Outbound {
|
|
|
2281
2439
|
}
|
|
2282
2440
|
const pageSize = query.limit ?? cost.pageSize;
|
|
2283
2441
|
if (query.records === void 0 || pageSize === void 0) {
|
|
2284
|
-
return {
|
|
2442
|
+
return {
|
|
2443
|
+
basis: `${plural(cost.perPage, "request")} per page`,
|
|
2444
|
+
requests: null
|
|
2445
|
+
};
|
|
2285
2446
|
}
|
|
2286
2447
|
const pages = Math.max(1, Math.ceil(query.records / pageSize));
|
|
2287
2448
|
const requests = pages * cost.perPage + query.records * (cost.perRecord ?? 0);
|
|
2288
2449
|
return {
|
|
2289
|
-
basis: `${pages
|
|
2450
|
+
basis: `${plural(pages, "page")} of ${pageSize} at ${plural(cost.perPage, "request")} each, plus ${cost.perRecord ?? 0} per record`,
|
|
2290
2451
|
requests
|
|
2291
2452
|
};
|
|
2292
2453
|
}
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
senderSchema,
|
|
12
12
|
sequenceSchema,
|
|
13
13
|
workspaceSchema
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BOWXGMN3.js";
|
|
15
15
|
import {
|
|
16
16
|
OutboundError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-J7DDZ4C2.js";
|
|
18
18
|
|
|
19
19
|
// src/internal/capabilities.ts
|
|
20
20
|
var NO_CAPABILITIES = {
|
package/dist/cli/bin.js
CHANGED
|
@@ -1,35 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import "../chunks/chunk-
|
|
6
|
-
import "../chunks/chunk-
|
|
2
|
+
import "../chunks/chunk-WGW3ROLY.js";
|
|
3
|
+
import "../chunks/chunk-X4RDBD4J.js";
|
|
4
|
+
import "../chunks/chunk-OLPMBRXM.js";
|
|
5
|
+
import "../chunks/chunk-BK5SLY32.js";
|
|
6
|
+
import "../chunks/chunk-HWHI4LFY.js";
|
|
7
|
+
import "../chunks/chunk-4PA526S7.js";
|
|
7
8
|
import "../chunks/chunk-HZCTYL22.js";
|
|
8
|
-
import "../chunks/chunk-
|
|
9
|
+
import "../chunks/chunk-YYCT3NGV.js";
|
|
9
10
|
import "../chunks/chunk-4O2HRTTI.js";
|
|
10
|
-
import "../chunks/chunk-
|
|
11
|
+
import "../chunks/chunk-HPNGSG5E.js";
|
|
12
|
+
import "../chunks/chunk-ZOAG2C6V.js";
|
|
13
|
+
import "../chunks/chunk-PTZO4QXR.js";
|
|
14
|
+
import "../chunks/chunk-BOWXGMN3.js";
|
|
15
|
+
import "../chunks/chunk-PQSTQKRD.js";
|
|
16
|
+
import "../chunks/chunk-QGRZDTX4.js";
|
|
17
|
+
import "../chunks/chunk-QAKJ76HB.js";
|
|
11
18
|
import "../chunks/chunk-NAWZ73QS.js";
|
|
12
19
|
import "../chunks/chunk-FHKSLCVW.js";
|
|
13
|
-
import "../chunks/chunk-
|
|
14
|
-
import "../chunks/chunk-
|
|
15
|
-
import "../chunks/chunk-
|
|
16
|
-
import "../chunks/chunk-
|
|
17
|
-
import "../chunks/chunk-
|
|
18
|
-
import "../chunks/chunk-LVYG7XZJ.js";
|
|
19
|
-
import "../chunks/chunk-E7JHLNLG.js";
|
|
20
|
-
import "../chunks/chunk-VQSCHOBV.js";
|
|
21
|
-
|
|
22
|
-
// src/cli/bin.ts
|
|
23
|
-
import process from "node:process";
|
|
24
|
-
import { createInterface } from "node:readline";
|
|
25
|
-
process.exitCode = await run(process.argv.slice(2), {
|
|
26
|
-
stderr: (text) => {
|
|
27
|
-
process.stderr.write(`${text}
|
|
28
|
-
`);
|
|
29
|
-
},
|
|
30
|
-
stdin: () => createInterface({ input: process.stdin }),
|
|
31
|
-
stdout: (text) => {
|
|
32
|
-
process.stdout.write(`${text}
|
|
33
|
-
`);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
20
|
+
import "../chunks/chunk-5J7GGV62.js";
|
|
21
|
+
import "../chunks/chunk-GFDNRWR3.js";
|
|
22
|
+
import "../chunks/chunk-J7DDZ4C2.js";
|
|
23
|
+
import "../chunks/chunk-BLCJHP5H.js";
|
|
24
|
+
import "../chunks/chunk-WH6V3YNN.js";
|
package/dist/cli/commands.d.ts
CHANGED
|
@@ -4,16 +4,27 @@ import type { OutboundTool } from "../tools/index.ts";
|
|
|
4
4
|
export interface CommandInput {
|
|
5
5
|
readonly positionals: readonly string[];
|
|
6
6
|
readonly flags: Readonly<Record<string, string | boolean | undefined>>;
|
|
7
|
+
/** Writes a line for the person to stderr, apart from the JSON on stdout. */
|
|
8
|
+
readonly note: (text: string) => void;
|
|
7
9
|
}
|
|
8
10
|
type Command = (outbound: OutboundApi, input: CommandInput) => Promise<Json>;
|
|
9
11
|
/** The tools `outbound mcp` offers: the built-in ones, then the insights. */
|
|
10
12
|
export declare const offeredTools: (outbound: OutboundApi) => Promise<OutboundTool[]>;
|
|
11
13
|
export interface CommandSpec {
|
|
12
14
|
readonly help: string;
|
|
15
|
+
/** The options this command takes, besides the ones every command takes. */
|
|
16
|
+
readonly flags: readonly string[];
|
|
13
17
|
readonly run: Command;
|
|
14
18
|
}
|
|
19
|
+
/** The options every command takes. */
|
|
20
|
+
export declare const GLOBAL_FLAGS: string[];
|
|
21
|
+
/** Refuses an option the command does not take, instead of ignoring it. */
|
|
22
|
+
export declare const checkFlags: (name: string, flags: readonly string[], given: readonly string[]) => void;
|
|
15
23
|
export declare const COMMANDS: Map<string, CommandSpec>;
|
|
16
24
|
/** The provider catalog. Needs no adapter and no key. */
|
|
17
25
|
export declare const listProviders: () => Json;
|
|
26
|
+
/** Every command with its options, then the options every command takes. */
|
|
18
27
|
export declare const helpText: () => string;
|
|
28
|
+
/** One command's options, then the options every command takes. */
|
|
29
|
+
export declare const commandHelp: (command: CommandSpec) => string;
|
|
19
30
|
export {};
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type { CliConfig } from "./config.ts";
|
|
|
4
4
|
export { createMcpServer, PROTOCOL_VERSIONS } from "./mcp.ts";
|
|
5
5
|
export type { McpServer, McpServerOptions } from "./mcp.ts";
|
|
6
6
|
export { serveStdio } from "./stdio.ts";
|
|
7
|
+
export type { NpmRunner } from "./update.ts";
|
|
7
8
|
export type { StdioOptions } from "./stdio.ts";
|
|
8
9
|
export interface CliIo {
|
|
9
10
|
readonly stdout: (text: string) => void;
|
|
@@ -12,6 +13,8 @@ export interface CliIo {
|
|
|
12
13
|
readonly stdin?: (() => AsyncIterable<string> | Iterable<string>) | undefined;
|
|
13
14
|
/** Replaces the adapter the environment would choose. Meant for tests. */
|
|
14
15
|
readonly adapter?: Adapter | undefined;
|
|
16
|
+
/** Runs npm for `outbound update` and resolves to its output. Meant for tests. */
|
|
17
|
+
readonly npm?: ((args: readonly string[]) => Promise<string>) | undefined;
|
|
15
18
|
}
|
|
16
19
|
/** Runs the CLI. Returns the process exit code. */
|
|
17
20
|
export declare const run: (argv: readonly string[], io: CliIo) => Promise<number>;
|
package/dist/cli/index.js
CHANGED
|
@@ -4,23 +4,28 @@ import {
|
|
|
4
4
|
defineConfig,
|
|
5
5
|
run,
|
|
6
6
|
serveStdio
|
|
7
|
-
} from "../chunks/chunk-
|
|
8
|
-
import "../chunks/chunk-
|
|
9
|
-
import "../chunks/chunk-
|
|
7
|
+
} from "../chunks/chunk-X4RDBD4J.js";
|
|
8
|
+
import "../chunks/chunk-OLPMBRXM.js";
|
|
9
|
+
import "../chunks/chunk-BK5SLY32.js";
|
|
10
|
+
import "../chunks/chunk-HWHI4LFY.js";
|
|
11
|
+
import "../chunks/chunk-4PA526S7.js";
|
|
10
12
|
import "../chunks/chunk-HZCTYL22.js";
|
|
11
|
-
import "../chunks/chunk-
|
|
13
|
+
import "../chunks/chunk-YYCT3NGV.js";
|
|
12
14
|
import "../chunks/chunk-4O2HRTTI.js";
|
|
13
|
-
import "../chunks/chunk-
|
|
15
|
+
import "../chunks/chunk-HPNGSG5E.js";
|
|
16
|
+
import "../chunks/chunk-ZOAG2C6V.js";
|
|
17
|
+
import "../chunks/chunk-PTZO4QXR.js";
|
|
18
|
+
import "../chunks/chunk-BOWXGMN3.js";
|
|
19
|
+
import "../chunks/chunk-PQSTQKRD.js";
|
|
20
|
+
import "../chunks/chunk-QGRZDTX4.js";
|
|
21
|
+
import "../chunks/chunk-QAKJ76HB.js";
|
|
14
22
|
import "../chunks/chunk-NAWZ73QS.js";
|
|
15
23
|
import "../chunks/chunk-FHKSLCVW.js";
|
|
16
|
-
import "../chunks/chunk-
|
|
17
|
-
import "../chunks/chunk-
|
|
18
|
-
import "../chunks/chunk-
|
|
19
|
-
import "../chunks/chunk-
|
|
20
|
-
import "../chunks/chunk-
|
|
21
|
-
import "../chunks/chunk-LVYG7XZJ.js";
|
|
22
|
-
import "../chunks/chunk-E7JHLNLG.js";
|
|
23
|
-
import "../chunks/chunk-VQSCHOBV.js";
|
|
24
|
+
import "../chunks/chunk-5J7GGV62.js";
|
|
25
|
+
import "../chunks/chunk-GFDNRWR3.js";
|
|
26
|
+
import "../chunks/chunk-J7DDZ4C2.js";
|
|
27
|
+
import "../chunks/chunk-BLCJHP5H.js";
|
|
28
|
+
import "../chunks/chunk-WH6V3YNN.js";
|
|
24
29
|
export {
|
|
25
30
|
PROTOCOL_VERSIONS,
|
|
26
31
|
createMcpServer,
|
package/dist/cli/mcp.d.ts
CHANGED
|
@@ -4,6 +4,11 @@ import type { ToolsOptions } from "../tools/index.ts";
|
|
|
4
4
|
export declare const PROTOCOL_VERSIONS: readonly ["2025-06-18", "2025-03-26", "2024-11-05"];
|
|
5
5
|
export interface McpServerOptions extends ToolsOptions {
|
|
6
6
|
readonly version?: string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Tools left out of this server, by name, with the reason. A call to one
|
|
9
|
+
* is answered with the reason instead of `Unknown tool`.
|
|
10
|
+
*/
|
|
11
|
+
readonly leftOut?: Readonly<Record<string, string>> | undefined;
|
|
7
12
|
}
|
|
8
13
|
export interface McpServer {
|
|
9
14
|
/** Handles one JSON-RPC message. Returns `undefined` for a notification. */
|