mcp-scraper 0.84.0 → 0.85.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/CHANGELOG.md CHANGED
@@ -4,6 +4,21 @@ All notable changes to MCP Scraper are documented here. The format is based on [
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.85.0] - 2026-09-01
8
+
9
+ ### Changed
10
+
11
+ - Corrected X-Ray's public contract to a provider-neutral measurement foundation: the Pixel, seven observed attribution models, structured post-purchase surveys, explicit Observed + Reported impact, privacy lifecycle, and truthful unavailable view-evidence states remain supported.
12
+ - Advanced the X-Ray install protocol to 3.0.0 and removed provider authorization and revenue-source continuations from generated install guidance.
13
+
14
+ ### Removed
15
+
16
+ - Removed the four revenue-source setup MCP tools, five REST operations, revenue-setup ResourceTemplate, Stripe dashboard workflow, and deployable Stripe, Salesforce, and Pipedrive Nango registrations until each provider has complete production receipts.
17
+
18
+ ### Fixed
19
+
20
+ - Routed the public X-Ray product page and nested attribution and SaaS guides through the canonical `mcpscraper.dev` host instead of leaving the successfully deployed web routes unreachable behind the API project.
21
+
7
22
  ## [0.84.0] - 2026-09-01
8
23
 
9
24
  ### Added
package/README.md CHANGED
@@ -175,7 +175,7 @@ Build the branded one-click bundle:
175
175
  npm run build:mcpb
176
176
  ```
177
177
 
178
- The generated bundle is written to `build/mcpb/mcp-scraper-<version>.mcpb` and copied to `public/downloads/` for the hosted download. The current public bundle is `https://mcpscraper.dev/downloads/mcp-scraper.mcpb` (`0.84.0`, SHA-256 `488d73bb3e41439c6b3676a25850ab4e9b883c29986b59732474ac3bfd48f79b`). Install it by opening or dragging it into Claude Desktop. Claude displays the `MCP Scraper` install card, icon, API-key configuration field, and manually curated current-release message from the bundle manifest.
178
+ The generated bundle is written to `build/mcpb/mcp-scraper-<version>.mcpb` and copied to `public/downloads/` for the hosted download. The current public bundle is `https://mcpscraper.dev/downloads/mcp-scraper.mcpb` (`0.85.0`, SHA-256 `2410fb6216af649dba24e62df9fa438b85e02c5ed2d3610f9e630314c0a0c2fb`). Install it by opening or dragging it into Claude Desktop. Claude displays the `MCP Scraper` install card, icon, API-key configuration field, and manually curated current-release message from the bundle manifest.
179
179
 
180
180
  The MCPB install exposes every tool — web-intelligence plus all `browser_*` tools — through the one `mcp-scraper` server.
181
181
 
@@ -337,7 +337,7 @@ The `mcp-scraper` server (and the MCPB bundle, which runs it) exposes both secti
337
337
 
338
338
  All MCP tools return `structuredContent` with the IDs, URLs, CSV paths, transcripts, browser session handles, replay paths, artifacts, recipe fields, or blueprint fields needed by the next step, plus readable text content for compatibility. Runtime `tools/list` omits output schemas so strict clients can register the complete catalog; the generated developer manifest retains every canonical output schema for validation and typed SDK generation. All tools carry MCP annotations; file-writing tools such as replay downloads and annotations state their filesystem side effects.
339
339
 
340
- The canonical tool inventory is generated at `docs/mcp-tool-manifest.generated.json`. The unified server exposes 373 tools: 272 scraper, browser, workflow, billing, connected-service, and personal-assistant tools plus 101 durable-memory tools. The scraper-side inventory includes complete Gmail selection, message, attachment, export, bulk-action, and Memory-import workflows; governed personal-assistant commands, messaging, approvals, grants, number setup, and execution readback; durable PAA starts and status; rendered site-content similarity; governed Local Sourcebook and Transparent Commons workflows; direct site-export reads; Editorial Reading Room and News Publisher templates; and production X-Ray setup, analytics, attribution, authoritative SaaS revenue, post-purchase surveys, reported impact, view-evidence status, CRM policy and receipt, campaign, export, and scheduled-report tools. Successful evidence-compiled Local Sourcebook revisions publish automatically to their canonical `localsourcebook.com` category profile and review URLs; administrator controls handle exceptional rejection or unpublishing. Release verification compares the exact local and hosted tool-name sets, not only the count.
340
+ The canonical tool inventory is generated at `docs/mcp-tool-manifest.generated.json`. The unified server exposes 369 tools: 268 scraper, browser, workflow, billing, connected-service, and personal-assistant tools plus 101 durable-memory tools. The scraper-side inventory includes complete Gmail selection, message, attachment, export, bulk-action, and Memory-import workflows; governed personal-assistant commands, messaging, approvals, grants, number setup, and execution readback; durable PAA starts and status; rendered site-content similarity; governed Local Sourcebook and Transparent Commons workflows; direct site-export reads; Editorial Reading Room and News Publisher templates; and production X-Ray setup, analytics, seven-model attribution, structured post-purchase surveys, reported impact, truthful view-evidence status, CRM policy and receipt, campaign, export, and scheduled-report tools. Provider setup remains absent until its authorization, ingestion, reconciliation, privacy, canary, cleanup, and deployment receipts are complete. Successful evidence-compiled Local Sourcebook revisions publish automatically to their canonical `localsourcebook.com` category profile and review URLs; administrator controls handle exceptional rejection or unpublishing. Release verification compares the exact local and hosted tool-name sets, not only the count.
341
341
 
342
342
  For contract parity, stdio and MCPB memory calls invoke the matching public tool on the hosted MCP Scraper `/mcp` endpoint. The hosted aggregate runtime owns MCP Scraper-specific billing, scheduling, credential, and in-process cutover policy; its internal `/memory/mcp-call` bridge is a fallback to the standalone memory service, not the public stdio execution path. Direct `mcp-memory` OAuth and stdio clients continue to use `memory.mcpscraper.dev` and must be verified as a separate dependent release surface.
343
343
 
@@ -17,8 +17,8 @@ loadDotEnv();
17
17
  async function main() {
18
18
  const [{ serve }, { app, personalAssistantProductionStartup }, { startWorker }, { migrate }] = await Promise.all([
19
19
  import("@hono/node-server"),
20
- import("../server-3F3JMHBF.js"),
21
- import("../worker-VTFGHWZL.js"),
20
+ import("../server-EOPETL7Q.js"),
21
+ import("../worker-5A375BGN.js"),
22
22
  import("../db-Z34LPZNR.js")
23
23
  ]);
24
24
  const PORT = parseInt(process.env.PORT ?? "3001");
@@ -6,7 +6,7 @@ import {
6
6
  openWorkflowReport,
7
7
  runWorkflow,
8
8
  workflowOutputBaseDir
9
- } from "../chunk-LHIWX7RM.js";
9
+ } from "../chunk-6IOGTFNS.js";
10
10
  import "../chunk-RJ7JVYKU.js";
11
11
  import "../chunk-OWF2JJKN.js";
12
12
  import {
@@ -15,11 +15,11 @@ import {
15
15
  XRAY_INSTALL_PROTOCOL_VERSION,
16
16
  renderXraySetupPrompt,
17
17
  xrayHostRecipe
18
- } from "../chunk-4S6HPHPB.js";
18
+ } from "../chunk-P7FWOMU7.js";
19
19
  import "../chunk-GGZEC22A.js";
20
20
  import {
21
21
  PACKAGE_VERSION
22
- } from "../chunk-OUTE3755.js";
22
+ } from "../chunk-RHAOKXQK.js";
23
23
 
24
24
  // src/cli/human-cli.ts
25
25
  import { Command } from "commander";
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runMcpScraperStdio
4
- } from "../chunk-WDWWCNMW.js";
5
- import "../chunk-U77X4NIR.js";
4
+ } from "../chunk-2ZDYUTOZ.js";
5
+ import "../chunk-W4IY6CB4.js";
6
6
  import "../chunk-PGJQDMC2.js";
7
7
  import "../chunk-DNM65UCK.js";
8
8
  import "../chunk-T3MZISOF.js";
9
9
  import "../chunk-6HAV7LCE.js";
10
- import "../chunk-UM7DCY6W.js";
10
+ import "../chunk-X5HRAAQM.js";
11
11
  import "../chunk-OM7HVEJ3.js";
12
12
  import "../chunk-OPQIGAFB.js";
13
- import "../chunk-NLWBM55O.js";
14
- import "../chunk-4S6HPHPB.js";
13
+ import "../chunk-WN7N4ESQ.js";
14
+ import "../chunk-P7FWOMU7.js";
15
15
  import "../chunk-GGZEC22A.js";
16
- import "../chunk-OUTE3755.js";
16
+ import "../chunk-RHAOKXQK.js";
17
17
  import "../chunk-YXNDOQXN.js";
18
18
 
19
19
  // src/mcp/thorbit-restricted-tool-surface.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  renderInstallTerminal
4
- } from "../chunk-NLWBM55O.js";
4
+ } from "../chunk-WN7N4ESQ.js";
5
5
  import {
6
6
  PACKAGE_VERSION
7
- } from "../chunk-OUTE3755.js";
7
+ } from "../chunk-RHAOKXQK.js";
8
8
 
9
9
  // bin/mcp-scraper-install.ts
10
10
  var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runMcpScraperStdio
4
- } from "../chunk-WDWWCNMW.js";
5
- import "../chunk-U77X4NIR.js";
4
+ } from "../chunk-2ZDYUTOZ.js";
5
+ import "../chunk-W4IY6CB4.js";
6
6
  import "../chunk-PGJQDMC2.js";
7
7
  import "../chunk-DNM65UCK.js";
8
8
  import "../chunk-T3MZISOF.js";
9
9
  import "../chunk-6HAV7LCE.js";
10
- import "../chunk-UM7DCY6W.js";
10
+ import "../chunk-X5HRAAQM.js";
11
11
  import "../chunk-OM7HVEJ3.js";
12
12
  import "../chunk-OPQIGAFB.js";
13
- import "../chunk-NLWBM55O.js";
14
- import "../chunk-4S6HPHPB.js";
13
+ import "../chunk-WN7N4ESQ.js";
14
+ import "../chunk-P7FWOMU7.js";
15
15
  import "../chunk-GGZEC22A.js";
16
- import "../chunk-OUTE3755.js";
16
+ import "../chunk-RHAOKXQK.js";
17
17
  import "../chunk-YXNDOQXN.js";
18
18
 
19
19
  // bin/mcp-stdio-server.ts
@@ -12,13 +12,13 @@ import {
12
12
  registerScheduledResultsMcpTools,
13
13
  registerSerpIntelligenceCaptureTools,
14
14
  resolveDeploymentProfile
15
- } from "./chunk-U77X4NIR.js";
15
+ } from "./chunk-W4IY6CB4.js";
16
16
  import {
17
17
  renderInstallTerminal
18
- } from "./chunk-NLWBM55O.js";
18
+ } from "./chunk-WN7N4ESQ.js";
19
19
  import {
20
20
  PACKAGE_VERSION
21
- } from "./chunk-OUTE3755.js";
21
+ } from "./chunk-RHAOKXQK.js";
22
22
 
23
23
  // src/mcp/stdio-runtime.ts
24
24
  import { readFileSync } from "fs";
@@ -11,7 +11,7 @@ import {
11
11
  extractContactEvidence,
12
12
  extractSerpEmailEvidence,
13
13
  selectPrimaryEmail
14
- } from "./chunk-4S6HPHPB.js";
14
+ } from "./chunk-P7FWOMU7.js";
15
15
 
16
16
  // src/lib/slugify.ts
17
17
  function slugify(s) {
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-DNM65UCK.js";
8
8
  import {
9
9
  LedgerOperation
10
- } from "./chunk-UM7DCY6W.js";
10
+ } from "./chunk-X5HRAAQM.js";
11
11
  import {
12
12
  CREDIT_LOT_TTL,
13
13
  getDb,
@@ -147,9 +147,8 @@ function extractContactEvidence(html, pageUrl) {
147
147
 
148
148
  // src/mcp/xray-install-contract.ts
149
149
  import { createHash } from "crypto";
150
- var XRAY_INSTALL_PROTOCOL_VERSION = "2.1.0";
150
+ var XRAY_INSTALL_PROTOCOL_VERSION = "3.0.0";
151
151
  var XRAY_SETUP_TOOL = "analytics_setup_site";
152
- var XRAY_REVENUE_SETUP_TOOL = "analytics_setup_revenue_source";
153
152
  var XRAY_TRIGGER_PHRASE = "Install X-Ray";
154
153
  var XRAY_CANONICAL_GOAL = "Install X-Ray and tell me what drives customers";
155
154
  var CONTINUATION = `Call ${XRAY_SETUP_TOOL} with { "startUrl": "<site URL>", "goal": "${XRAY_CANONICAL_GOAL}" }; on every later call, reuse the returned setupId and revision.`;
@@ -179,10 +178,8 @@ var XRAY_INSTALL_CONTRACT_PAYLOAD = {
179
178
  },
180
179
  facade: {
181
180
  tool: XRAY_SETUP_TOOL,
182
- saasRevenueTool: XRAY_REVENUE_SETUP_TOOL,
183
181
  initialCall: { startUrl: "<site URL>", goal: XRAY_CANONICAL_GOAL },
184
- continuationRule: "Treat setupId plus revision as the durable continuation handle. Reuse both after approval, runtime publication, verification, retry, or return.",
185
- saasContinuationRule: `When the Site setup reaches outcome_connection_required for SaaS, continue through ${XRAY_REVENUE_SETUP_TOOL} with an already-authorized connection reference. Never request or accept provider credentials.`
182
+ continuationRule: "Treat setupId plus revision as the durable continuation handle. Reuse both after approval, runtime publication, verification, retry, or return."
186
183
  },
187
184
  topologies: {
188
185
  local_stdio: {
@@ -294,7 +291,7 @@ var XRAY_INSTALL_CONTRACT_PAYLOAD = {
294
291
  "Infer the business model and customer outcome, then propose one privacy-safe measurement plan.",
295
292
  "If the Pixel is absent, return the canonical one-time tag and exact uncovered surfaces; do not claim ongoing control there.",
296
293
  "Publish an approved measurement revision as a digest-bound runtime manifest; source or repository access is not required.",
297
- `For SaaS, continue outcome readiness through ${XRAY_REVENUE_SETUP_TOOL}: prepare an authorized connection, apply one exact revision, and verify a non-customer provider receipt.`,
294
+ "For SaaS, verify the measurement foundation: global tag coverage, ad-source capture, lifecycle events, currency and timezone, consent, and observed outcome events.",
298
295
  "Optionally publish a structured post-purchase survey after approved disclosure evidence; reported influence remains separate from deterministic touches.",
299
296
  "Compare observed attribution with customer-reported influence only with explicit weights totaling 1,000,000 micros and a named methodology version.",
300
297
  "Keep view-through reporting unavailable until event-level provider evidence can join to an eligible X-Ray subject; aggregate impressions never qualify.",
@@ -310,10 +307,10 @@ var XRAY_INSTALL_CONTRACT_PAYLOAD = {
310
307
  "Never treat a CTA click as a customer, sale, or revenue event without verified outcome evidence.",
311
308
  "Never claim full-domain installation while an in-scope route or renderer is missing, excluded without approval, or unverifiable.",
312
309
  "Never treat event-name presence as verification; require persisted definition ID and version evidence.",
313
- "Never accept payment-provider credentials, survey invitation tokens, or exchange codes through MCP inputs or prompts.",
310
+ "Never accept survey invitation tokens or exchange codes through MCP inputs or prompts.",
314
311
  "Never treat customer-reported influence as identity, CRM mutation authority, ad-activation evidence, or a deterministic touch."
315
312
  ],
316
- terminalStates: ["complete", "tag_required", "input_required", "approval_required", "runtime_convergence_required", "outcome_connection_required", "not_ready", "error"]
313
+ terminalStates: ["complete", "tag_required", "input_required", "approval_required", "runtime_convergence_required", "not_ready", "error"]
317
314
  };
318
315
  function canonicalJson(value) {
319
316
  if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
@@ -343,7 +340,7 @@ function renderXraySetupPrompt() {
343
340
  "",
344
341
  `Use ${XRAY_SETUP_TOOL} as the single conversational setup facade. Ask for the target site URL if it is missing, then call it with the goal \u201C${XRAY_CANONICAL_GOAL}\u201D.`,
345
342
  "",
346
- `Continue the same setup with its setupId and revision. Confirm one global Pixel across all public rendering surfaces; present one measurement plan; publish it as a digest-bound runtime manifest after exact-revision approval; verify manifest and rule versions; then return first customer-journey answers or explicit readiness thresholds. For SaaS outcome readiness, continue through ${XRAY_REVENUE_SETUP_TOOL} with an already-authorized provider connection and verify a non-customer receipt. GitHub or repository access is not required after the tag is installed.`,
343
+ "Continue the same setup with its setupId and revision. Confirm one global Pixel across all public rendering surfaces; present one measurement plan; publish it as a digest-bound runtime manifest after exact-revision approval; verify manifest and rule versions; then return first customer-journey answers or explicit readiness thresholds. For SaaS, verify the provider-neutral measurement foundation. Browser events never prove paid revenue. GitHub or repository access is not required after the tag is installed.",
347
344
  "",
348
345
  "Do not request pasted credentials, invent tracking code, silently activate measurement, call ad platforms directly, or claim customers/revenue from CTA clicks."
349
346
  ].join("\n");
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var PACKAGE_VERSION = "0.84.0";
2
+ var PACKAGE_VERSION = "0.85.0";
3
3
 
4
4
  export {
5
5
  PACKAGE_VERSION
@@ -19,7 +19,7 @@ import {
19
19
  LedgerOperation,
20
20
  MC_PER_CREDIT,
21
21
  calculateConnectedUsageCharge
22
- } from "./chunk-UM7DCY6W.js";
22
+ } from "./chunk-X5HRAAQM.js";
23
23
  import {
24
24
  recordVendorUsage,
25
25
  runWithCostContext
@@ -528,6 +528,11 @@ var NANGO_TOOL_CALL_TIMEOUT_MS = 24e4;
528
528
  var NANGO_CONNECTION_PAGE_SIZE = 100;
529
529
  var NANGO_CONNECTION_MAX_PAGES = 20;
530
530
  var PROVIDER_IDENTITY_RETRY_MS = 6 * 60 * 60 * 1e3;
531
+ var WITHDRAWN_NANGO_PROVIDER_CONFIG_KEYS = /* @__PURE__ */ new Set([
532
+ "stripe_revenue",
533
+ "salesforce",
534
+ "pipedrive"
535
+ ]);
531
536
  var MAIN_INTEGRATION_CONTRACT_VERSION = "2026-07-16.1";
532
537
  var MAIN_INTEGRATION_CONTRACT_HASH = "f037859ec80c2ea2fac6e4a67c1a59f3200dd22d3642c97789b9bb3236723d3e";
533
538
  var MainNangoTransportError = class extends Error {
@@ -544,6 +549,18 @@ var MainNangoTransportError = class extends Error {
544
549
  this.retryAfterMs = retryAfterMs;
545
550
  }
546
551
  };
552
+ function isWithdrawnNangoProvider(providerConfigKey) {
553
+ return typeof providerConfigKey === "string" && WITHDRAWN_NANGO_PROVIDER_CONFIG_KEYS.has(providerConfigKey.normalize("NFKC").trim().toLowerCase());
554
+ }
555
+ function assertNangoProviderAvailable(providerConfigKey) {
556
+ if (!isWithdrawnNangoProvider(providerConfigKey)) return;
557
+ throw new MainNangoTransportError(
558
+ "This provider integration is not currently available.",
559
+ 409,
560
+ "provider_unavailable",
561
+ false
562
+ );
563
+ }
547
564
  function nangoClientErrorText(error) {
548
565
  if (error instanceof Error) return error.message;
549
566
  if (typeof error === "string") return error;
@@ -907,12 +924,13 @@ async function discoverOwnedNangoConnections(identity, options = {}) {
907
924
  }
908
925
  const discovered = rows.filter((row) => connectionIdentityMatches(row, identity)).map(discoveredConnection).filter((connection) => connection !== null);
909
926
  const reconciled = await reconcileDiscoveredNangoConnections(identity, discovered);
910
- if (options.resolveProviderIdentity === false) return reconciled;
927
+ const visibleConnections = reconciled.filter((connection) => !isWithdrawnNangoProvider(connection.providerConfigKey));
928
+ if (options.resolveProviderIdentity === false) return visibleConnections;
911
929
  const remoteByKey = new Map(discovered.map((connection) => [
912
930
  `${connection.providerConfigKey}\0${connection.upstreamConnectionId}`,
913
931
  connection
914
932
  ]));
915
- await Promise.all(reconciled.map(async (connection) => {
933
+ await Promise.all(visibleConnections.map(async (connection) => {
916
934
  if (connection.lifecycleStatus !== "connected" || !connection.upstreamConnectionId) return;
917
935
  const remote = remoteByKey.get(`${connection.providerConfigKey}\0${connection.upstreamConnectionId}`);
918
936
  if (!remote) return;
@@ -935,7 +953,7 @@ async function discoverOwnedNangoConnections(identity, options = {}) {
935
953
  sourceUpdatedAt
936
954
  });
937
955
  }));
938
- return reconcileDiscoveredNangoConnections(identity, discovered);
956
+ return (await reconcileDiscoveredNangoConnections(identity, discovered)).filter((connection) => !isWithdrawnNangoProvider(connection.providerConfigKey));
939
957
  }
940
958
  async function listNangoCatalogDirect() {
941
959
  const [integrationsPayload, providersPayload] = await Promise.all([
@@ -952,7 +970,7 @@ async function listNangoCatalogDirect() {
952
970
  const row = asRecord(value);
953
971
  const id = text(row?.unique_key) ?? text(row?.id);
954
972
  const provider = text(row?.provider);
955
- if (!id || !provider) return [];
973
+ if (!id || !provider || isWithdrawnNangoProvider(id)) return [];
956
974
  const definition = providers.get(provider);
957
975
  return [{
958
976
  id,
@@ -986,6 +1004,7 @@ function sessionPayload(value) {
986
1004
  return { connectLink, expiresAt: text(data?.expires_at) };
987
1005
  }
988
1006
  async function createNangoSessionDirect(identity, providerConfigKey) {
1007
+ assertNangoProviderAvailable(providerConfigKey);
989
1008
  const defaults = connectDefaults(providerConfigKey);
990
1009
  return sessionPayload(await nangoRequest("/connect/sessions", {
991
1010
  method: "POST",
@@ -1010,7 +1029,7 @@ async function createNangoReconnectSessionDirect(identity, connectionId) {
1010
1029
  }));
1011
1030
  }
1012
1031
  async function deleteNangoConnectionDirect(identity, connectionId) {
1013
- const connection = await requireOwnedActiveConnection(identity, connectionId, true);
1032
+ const connection = await requireOwnedNangoConnectionForCleanup(identity, connectionId);
1014
1033
  try {
1015
1034
  await nangoRequest(`/connections/${encodeURIComponent(connection.upstreamConnectionId)}`, {
1016
1035
  method: "DELETE",
@@ -1020,11 +1039,16 @@ async function deleteNangoConnectionDirect(identity, connectionId) {
1020
1039
  if (!(error instanceof MainNangoTransportError) || error.status !== 404) throw error;
1021
1040
  }
1022
1041
  }
1023
- async function requireOwnedActiveConnection(identity, connectionId, allowNeedsReauth = false) {
1042
+ async function requireOwnedNangoConnectionForCleanup(identity, connectionId) {
1024
1043
  const connection = await getOwnedServiceConnection(identity, connectionId);
1025
1044
  if (!connection || connection.transport !== "nango" || !connection.upstreamConnectionId) {
1026
1045
  throw new MainNangoTransportError("Service connection not found.", 404, "connection_not_found", false);
1027
1046
  }
1047
+ return connection;
1048
+ }
1049
+ async function requireOwnedActiveConnection(identity, connectionId, allowNeedsReauth = false) {
1050
+ const connection = await requireOwnedNangoConnectionForCleanup(identity, connectionId);
1051
+ assertNangoProviderAvailable(connection.providerConfigKey);
1028
1052
  if (connection.lifecycleStatus !== "connected" && !(allowNeedsReauth && connection.lifecycleStatus === "needs_reauth")) {
1029
1053
  throw new MainNangoTransportError("Service connection requires reconnection.", 409, "connection_inactive", false);
1030
1054
  }
@@ -2028,6 +2052,8 @@ export {
2028
2052
  settleConnectedUsage,
2029
2053
  listConnectedUsageHistory,
2030
2054
  MainNangoTransportError,
2055
+ isWithdrawnNangoProvider,
2056
+ assertNangoProviderAvailable,
2031
2057
  discoverOwnedNangoConnections,
2032
2058
  listNangoCatalogDirect,
2033
2059
  createNangoSessionDirect,