mcp-scraper 0.69.0 → 0.69.1

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,11 @@ All notable changes to MCP Scraper are documented here. The format is based on [
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ### Fixed
8
+
9
+ - Meta activation asset discovery now resolves the authorized ad account before listing its datasets, so the dashboard can select an actual connected dataset instead of requiring a copied ID.
10
+ - `analytics_test_activation_destination` now accepts and forwards the provider test code required by Meta/TikTok or the test ID required by Reddit, matching the REST and dashboard contracts.
11
+
7
12
  ## [0.69.0] - 2026-08-27
8
13
 
9
14
  ### Added
package/README.md CHANGED
@@ -159,7 +159,7 @@ Build the branded one-click bundle:
159
159
  npm run build:mcpb
160
160
  ```
161
161
 
162
- 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.69.0`, SHA-256 `052a9fc23beb72deae11e48c1e49978aaab6408a0cb1ce13415a17eec7508330`). 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.
162
+ 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.69.1`, SHA-256 `21d4e7c0dc0e4a44c0f4af293e864b16aafb09d184282203ee2618380fbf8c0f`). 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.
163
163
 
164
164
  The MCPB install exposes every tool — web-intelligence plus all `browser_*` tools — through the one `mcp-scraper` server.
165
165
 
@@ -50241,7 +50241,7 @@ var PACKAGE_VERSION;
50241
50241
  var init_version = __esm({
50242
50242
  "src/version.ts"() {
50243
50243
  "use strict";
50244
- PACKAGE_VERSION = "0.69.0";
50244
+ PACKAGE_VERSION = "0.69.1";
50245
50245
  }
50246
50246
  });
50247
50247
 
@@ -50886,6 +50886,8 @@ var init_input_field_descriptions = __esm({
50886
50886
  intervalSeconds: "Bounded CRM synchronization interval in seconds; null disables it.",
50887
50887
  availableObjects: "Bounded CRM discovery objects used to validate a mapping.",
50888
50888
  targetObject: "Person or visitor object evaluated by a lead score.",
50889
+ testEventCode: "Provider test event code required by Meta and TikTok for a non-live destination verification event.",
50890
+ testId: "Provider test identifier required by Reddit for a non-live destination verification event.",
50889
50891
  permittedProperties: "Explicit property allowlist available to score predicates.",
50890
50892
  groups: "Declarative bounded score-rule groups.",
50891
50893
  kind: "Governed type discriminator for this rule, score, event, or record.",
@@ -56437,7 +56439,9 @@ var init_analytics_mcp_schemas = __esm({
56437
56439
  };
56438
56440
  AnalyticsTestActivationDestinationInputSchema = {
56439
56441
  siteId: import_zod48.z.string().uuid(),
56440
- destinationId: import_zod48.z.string().uuid().describe("Activation destination id returned by analytics_list_activation_destinations.")
56442
+ destinationId: import_zod48.z.string().uuid().describe("Activation destination id returned by analytics_list_activation_destinations."),
56443
+ testEventCode: import_zod48.z.string().trim().min(1).max(128).optional().describe("Provider test event code required by Meta and TikTok. Obtain it from the authorized provider test-events screen; it is sent only to that configured destination."),
56444
+ testId: import_zod48.z.string().trim().min(1).max(255).optional().describe("Provider test ID required by Reddit Conversions API. It is sent only to that configured destination.")
56441
56445
  };
56442
56446
  AnalyticsListActivationReceiptsInputSchema = {
56443
56447
  siteId: import_zod48.z.string().uuid(),
@@ -57045,7 +57049,7 @@ function registerAnalyticsMcpTools(server, executor) {
57045
57049
  ["analytics_update_event_definition", "Update Browser Event Definition", "Update a versioned declarative browser event definition. Null path, selector, or metadata clears that optional field.", AnalyticsUpdateEventDefinitionInputSchema, "analyticsUpdateEventDefinition", false, false, false, false],
57046
57050
  ["analytics_archive_event_definition", "Archive Browser Event Definition", "Idempotently archive a browser event definition so the Pixel no longer receives it.", AnalyticsArchiveEventDefinitionInputSchema, "analyticsArchiveEventDefinition", false, true, true, false],
57047
57051
  ["analytics_test_event_definition", "Test Browser Event Definition", "Preview a definition against validated hostname, path, trigger, tag, and browser-reported selector-match facts. This never accepts HTML or executes selectors server-side.", AnalyticsTestEventDefinitionInputSchema, "analyticsTestEventDefinition", true, true, false, false],
57048
- ["analytics_test_activation_destination", "Test Ad Activation Destination", "Send the provider-specific verification test for a configured activation destination and return its safe receipt.", AnalyticsTestActivationDestinationInputSchema, "analyticsTestActivationDestination", false, false, false, true],
57052
+ ["analytics_test_activation_destination", "Test Ad Activation Destination", "Send the provider-specific verification test for a configured activation destination and return its safe receipt. Meta and TikTok require testEventCode; Reddit requires testId.", AnalyticsTestActivationDestinationInputSchema, "analyticsTestActivationDestination", false, false, false, true],
57049
57053
  ["analytics_list_activation_receipts", "List Ad Activation Receipts", "List bounded provider delivery receipts for one activation destination.", AnalyticsListActivationReceiptsInputSchema, "analyticsListActivationReceipts", true, true, false, false],
57050
57054
  ["analytics_retry_activation_delivery", "Retry Ad Activation Delivery", "Requeue one failed or dead-lettered activation job. This may cause an external provider delivery.", AnalyticsRetryActivationDeliveryInputSchema, "analyticsRetryActivationDelivery", false, false, false, true],
57051
57055
  ["analytics_reconcile_connection", "Reconcile X-Ray Connection", "Reconcile one phone or CRM connection through its configured provider API and return readiness and checkpoint evidence.", AnalyticsReconcileConnectionInputSchema, "analyticsReconcileConnection", false, true, false, true]
@@ -58907,7 +58911,8 @@ var init_http_mcp_tool_executor = __esm({
58907
58911
  return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/event-definitions/${encodeURIComponent(definitionId)}/test`, body, this.timeoutMs, "POST");
58908
58912
  }
58909
58913
  analyticsTestActivationDestination(input) {
58910
- return this.call(`/analytics/sites/${encodeURIComponent(input.siteId)}/activation-destinations/${encodeURIComponent(input.destinationId)}/test`, {}, this.timeoutMs, "POST");
58914
+ const { siteId, destinationId, ...body } = input;
58915
+ return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/activation-destinations/${encodeURIComponent(destinationId)}/test`, body, this.timeoutMs, "POST");
58911
58916
  }
58912
58917
  analyticsListActivationReceipts(input) {
58913
58918
  const query = new URLSearchParams({ limit: String(input.limit) });
@@ -93011,6 +93016,26 @@ Imported through the Site Analytics CRM workflow.
93011
93016
  if (!discoveryAction) {
93012
93017
  return c.json({ ok: true, platform: platform2.data, requiredDestinationField: definition.requiredDestinationField, assets: [], manualEntryAllowed: true, discovery: "not_advertised" }, 200, noStore);
93013
93018
  }
93019
+ if (platform2.data === "meta" && discoveryAction === "list-datasets") {
93020
+ if (!advertised.includes("list-ad-accounts")) {
93021
+ return c.json({ ok: true, platform: platform2.data, requiredDestinationField: definition.requiredDestinationField, assets: [], manualEntryAllowed: true, discovery: "account_discovery_not_advertised" }, 200, noStore);
93022
+ }
93023
+ const accountResult = await callScheduleConnectionAction(user.email, connectionRef, { limit: 25 }, "list-ad-accounts");
93024
+ const accountRoot = accountResult && typeof accountResult === "object" ? accountResult : {};
93025
+ const accounts = Array.isArray(accountRoot.adAccounts) ? accountRoot.adAccounts : [];
93026
+ const accountIds = accounts.flatMap((item) => {
93027
+ if (!item || typeof item !== "object") return [];
93028
+ const record = item;
93029
+ const id = [record.id, record.accountId, record.account_id].find((entry) => typeof entry === "string" && entry.trim());
93030
+ return id ? [id.slice(0, 240)] : [];
93031
+ }).slice(0, 25);
93032
+ const datasets = (await Promise.all(accountIds.map(async (adAccountId) => {
93033
+ const result = await callScheduleConnectionAction(user.email, connectionRef, { adAccountId, limit: 100 }, discoveryAction);
93034
+ return safeActivationAssets(result);
93035
+ }))).flat();
93036
+ const uniqueAssets = [...new Map(datasets.map((asset) => [asset.id, asset])).values()].slice(0, 500);
93037
+ return c.json({ ok: true, platform: platform2.data, requiredDestinationField: definition.requiredDestinationField, assets: uniqueAssets, manualEntryAllowed: true, discovery: "authorized_provider" }, 200, noStore);
93038
+ }
93014
93039
  const raw = await callScheduleConnectionAction(user.email, connectionRef, { platform: platform2.data }, discoveryAction);
93015
93040
  return c.json({ ok: true, platform: platform2.data, requiredDestinationField: definition.requiredDestinationField, assets: safeActivationAssets(raw), manualEntryAllowed: true, discovery: "authorized_provider" }, 200, noStore);
93016
93041
  });
@@ -17,7 +17,7 @@ loadDotEnv();
17
17
  async function main() {
18
18
  const [{ serve }, { app }, { startWorker }, { migrate }] = await Promise.all([
19
19
  import("@hono/node-server"),
20
- import("../server-WCNYXILA.js"),
20
+ import("../server-VDJBV4V4.js"),
21
21
  import("../worker-KHSJG365.js"),
22
22
  import("../db-ZGZAKYBW.js")
23
23
  ]);
@@ -30,7 +30,7 @@ var import_promises5 = require("fs/promises");
30
30
  var import_node_path3 = require("path");
31
31
 
32
32
  // src/version.ts
33
- var PACKAGE_VERSION = "0.69.0";
33
+ var PACKAGE_VERSION = "0.69.1";
34
34
 
35
35
  // src/cli/agent-config.ts
36
36
  function apiKeyValue(options) {
@@ -13,7 +13,7 @@ import "../chunk-VXLU74YZ.js";
13
13
  import "../chunk-GGZEC22A.js";
14
14
  import {
15
15
  PACKAGE_VERSION
16
- } from "../chunk-ULYOCJUJ.js";
16
+ } from "../chunk-RODSHBN7.js";
17
17
 
18
18
  // src/cli/human-cli.ts
19
19
  import { Command } from "commander";
@@ -112,7 +112,7 @@ function renderInstallTerminal(options) {
112
112
  }
113
113
 
114
114
  // src/version.ts
115
- var PACKAGE_VERSION = "0.69.0";
115
+ var PACKAGE_VERSION = "0.69.1";
116
116
 
117
117
  // bin/mcp-scraper-install.ts
118
118
  var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-RX2QAHML.js";
5
5
  import {
6
6
  PACKAGE_VERSION
7
- } from "../chunk-ULYOCJUJ.js";
7
+ } from "../chunk-RODSHBN7.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;
@@ -1104,7 +1104,8 @@ var HttpMcpToolExecutor = class {
1104
1104
  return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/event-definitions/${encodeURIComponent(definitionId)}/test`, body, this.timeoutMs, "POST");
1105
1105
  }
1106
1106
  analyticsTestActivationDestination(input) {
1107
- return this.call(`/analytics/sites/${encodeURIComponent(input.siteId)}/activation-destinations/${encodeURIComponent(input.destinationId)}/test`, {}, this.timeoutMs, "POST");
1107
+ const { siteId, destinationId, ...body } = input;
1108
+ return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/activation-destinations/${encodeURIComponent(destinationId)}/test`, body, this.timeoutMs, "POST");
1108
1109
  }
1109
1110
  analyticsListActivationReceipts(input) {
1110
1111
  const query = new URLSearchParams({ limit: String(input.limit) });
@@ -1555,7 +1556,7 @@ render();
1555
1556
  }
1556
1557
 
1557
1558
  // src/version.ts
1558
- var PACKAGE_VERSION = "0.69.0";
1559
+ var PACKAGE_VERSION = "0.69.1";
1559
1560
 
1560
1561
  // src/mcp/input-field-descriptions.ts
1561
1562
  var import_zod = require("zod");
@@ -1654,6 +1655,8 @@ var FIELD_DESCRIPTIONS = {
1654
1655
  intervalSeconds: "Bounded CRM synchronization interval in seconds; null disables it.",
1655
1656
  availableObjects: "Bounded CRM discovery objects used to validate a mapping.",
1656
1657
  targetObject: "Person or visitor object evaluated by a lead score.",
1658
+ testEventCode: "Provider test event code required by Meta and TikTok for a non-live destination verification event.",
1659
+ testId: "Provider test identifier required by Reddit for a non-live destination verification event.",
1657
1660
  permittedProperties: "Explicit property allowlist available to score predicates.",
1658
1661
  groups: "Declarative bounded score-rule groups.",
1659
1662
  kind: "Governed type discriminator for this rule, score, event, or record.",
@@ -14235,7 +14238,9 @@ var AnalyticsTestEventDefinitionInputSchema = {
14235
14238
  };
14236
14239
  var AnalyticsTestActivationDestinationInputSchema = {
14237
14240
  siteId: import_zod11.z.string().uuid(),
14238
- destinationId: import_zod11.z.string().uuid().describe("Activation destination id returned by analytics_list_activation_destinations.")
14241
+ destinationId: import_zod11.z.string().uuid().describe("Activation destination id returned by analytics_list_activation_destinations."),
14242
+ testEventCode: import_zod11.z.string().trim().min(1).max(128).optional().describe("Provider test event code required by Meta and TikTok. Obtain it from the authorized provider test-events screen; it is sent only to that configured destination."),
14243
+ testId: import_zod11.z.string().trim().min(1).max(255).optional().describe("Provider test ID required by Reddit Conversions API. It is sent only to that configured destination.")
14239
14244
  };
14240
14245
  var AnalyticsListActivationReceiptsInputSchema = {
14241
14246
  siteId: import_zod11.z.string().uuid(),
@@ -14892,7 +14897,7 @@ function registerAnalyticsMcpTools(server, executor) {
14892
14897
  ["analytics_update_event_definition", "Update Browser Event Definition", "Update a versioned declarative browser event definition. Null path, selector, or metadata clears that optional field.", AnalyticsUpdateEventDefinitionInputSchema, "analyticsUpdateEventDefinition", false, false, false, false],
14893
14898
  ["analytics_archive_event_definition", "Archive Browser Event Definition", "Idempotently archive a browser event definition so the Pixel no longer receives it.", AnalyticsArchiveEventDefinitionInputSchema, "analyticsArchiveEventDefinition", false, true, true, false],
14894
14899
  ["analytics_test_event_definition", "Test Browser Event Definition", "Preview a definition against validated hostname, path, trigger, tag, and browser-reported selector-match facts. This never accepts HTML or executes selectors server-side.", AnalyticsTestEventDefinitionInputSchema, "analyticsTestEventDefinition", true, true, false, false],
14895
- ["analytics_test_activation_destination", "Test Ad Activation Destination", "Send the provider-specific verification test for a configured activation destination and return its safe receipt.", AnalyticsTestActivationDestinationInputSchema, "analyticsTestActivationDestination", false, false, false, true],
14900
+ ["analytics_test_activation_destination", "Test Ad Activation Destination", "Send the provider-specific verification test for a configured activation destination and return its safe receipt. Meta and TikTok require testEventCode; Reddit requires testId.", AnalyticsTestActivationDestinationInputSchema, "analyticsTestActivationDestination", false, false, false, true],
14896
14901
  ["analytics_list_activation_receipts", "List Ad Activation Receipts", "List bounded provider delivery receipts for one activation destination.", AnalyticsListActivationReceiptsInputSchema, "analyticsListActivationReceipts", true, true, false, false],
14897
14902
  ["analytics_retry_activation_delivery", "Retry Ad Activation Delivery", "Requeue one failed or dead-lettered activation job. This may cause an external provider delivery.", AnalyticsRetryActivationDeliveryInputSchema, "analyticsRetryActivationDelivery", false, false, false, true],
14898
14903
  ["analytics_reconcile_connection", "Reconcile X-Ray Connection", "Reconcile one phone or CRM connection through its configured provider API and return readiness and checkpoint evidence.", AnalyticsReconcileConnectionInputSchema, "analyticsReconcileConnection", false, true, false, true]
@@ -13,7 +13,7 @@ import {
13
13
  registerScheduledResultsMcpTools,
14
14
  registerSerpIntelligenceCaptureTools,
15
15
  resolveDeploymentProfile
16
- } from "../chunk-M7D7WO75.js";
16
+ } from "../chunk-2LMMZUU5.js";
17
17
  import "../chunk-PGJQDMC2.js";
18
18
  import "../chunk-2L4C4DAZ.js";
19
19
  import "../chunk-ES25GP6C.js";
@@ -24,7 +24,7 @@ import "../chunk-VXLU74YZ.js";
24
24
  import "../chunk-GGZEC22A.js";
25
25
  import {
26
26
  PACKAGE_VERSION
27
- } from "../chunk-ULYOCJUJ.js";
27
+ } from "../chunk-RODSHBN7.js";
28
28
  import "../chunk-DNM65UCK.js";
29
29
  import "../chunk-5RFQGIYC.js";
30
30
  import "../chunk-65FTMB7G.js";
@@ -25,7 +25,7 @@ import {
25
25
  } from "./chunk-VXLU74YZ.js";
26
26
  import {
27
27
  PACKAGE_VERSION
28
- } from "./chunk-ULYOCJUJ.js";
28
+ } from "./chunk-RODSHBN7.js";
29
29
  import {
30
30
  createPrivateArtifact,
31
31
  privateArtifactOwnerId,
@@ -854,6 +854,8 @@ var FIELD_DESCRIPTIONS = {
854
854
  intervalSeconds: "Bounded CRM synchronization interval in seconds; null disables it.",
855
855
  availableObjects: "Bounded CRM discovery objects used to validate a mapping.",
856
856
  targetObject: "Person or visitor object evaluated by a lead score.",
857
+ testEventCode: "Provider test event code required by Meta and TikTok for a non-live destination verification event.",
858
+ testId: "Provider test identifier required by Reddit for a non-live destination verification event.",
857
859
  permittedProperties: "Explicit property allowlist available to score predicates.",
858
860
  groups: "Declarative bounded score-rule groups.",
859
861
  kind: "Governed type discriminator for this rule, score, event, or record.",
@@ -11409,7 +11411,9 @@ var AnalyticsTestEventDefinitionInputSchema = {
11409
11411
  };
11410
11412
  var AnalyticsTestActivationDestinationInputSchema = {
11411
11413
  siteId: z9.string().uuid(),
11412
- destinationId: z9.string().uuid().describe("Activation destination id returned by analytics_list_activation_destinations.")
11414
+ destinationId: z9.string().uuid().describe("Activation destination id returned by analytics_list_activation_destinations."),
11415
+ testEventCode: z9.string().trim().min(1).max(128).optional().describe("Provider test event code required by Meta and TikTok. Obtain it from the authorized provider test-events screen; it is sent only to that configured destination."),
11416
+ testId: z9.string().trim().min(1).max(255).optional().describe("Provider test ID required by Reddit Conversions API. It is sent only to that configured destination.")
11413
11417
  };
11414
11418
  var AnalyticsListActivationReceiptsInputSchema = {
11415
11419
  siteId: z9.string().uuid(),
@@ -12066,7 +12070,7 @@ function registerAnalyticsMcpTools(server, executor) {
12066
12070
  ["analytics_update_event_definition", "Update Browser Event Definition", "Update a versioned declarative browser event definition. Null path, selector, or metadata clears that optional field.", AnalyticsUpdateEventDefinitionInputSchema, "analyticsUpdateEventDefinition", false, false, false, false],
12067
12071
  ["analytics_archive_event_definition", "Archive Browser Event Definition", "Idempotently archive a browser event definition so the Pixel no longer receives it.", AnalyticsArchiveEventDefinitionInputSchema, "analyticsArchiveEventDefinition", false, true, true, false],
12068
12072
  ["analytics_test_event_definition", "Test Browser Event Definition", "Preview a definition against validated hostname, path, trigger, tag, and browser-reported selector-match facts. This never accepts HTML or executes selectors server-side.", AnalyticsTestEventDefinitionInputSchema, "analyticsTestEventDefinition", true, true, false, false],
12069
- ["analytics_test_activation_destination", "Test Ad Activation Destination", "Send the provider-specific verification test for a configured activation destination and return its safe receipt.", AnalyticsTestActivationDestinationInputSchema, "analyticsTestActivationDestination", false, false, false, true],
12073
+ ["analytics_test_activation_destination", "Test Ad Activation Destination", "Send the provider-specific verification test for a configured activation destination and return its safe receipt. Meta and TikTok require testEventCode; Reddit requires testId.", AnalyticsTestActivationDestinationInputSchema, "analyticsTestActivationDestination", false, false, false, true],
12070
12074
  ["analytics_list_activation_receipts", "List Ad Activation Receipts", "List bounded provider delivery receipts for one activation destination.", AnalyticsListActivationReceiptsInputSchema, "analyticsListActivationReceipts", true, true, false, false],
12071
12075
  ["analytics_retry_activation_delivery", "Retry Ad Activation Delivery", "Requeue one failed or dead-lettered activation job. This may cause an external provider delivery.", AnalyticsRetryActivationDeliveryInputSchema, "analyticsRetryActivationDelivery", false, false, false, true],
12072
12076
  ["analytics_reconcile_connection", "Reconcile X-Ray Connection", "Reconcile one phone or CRM connection through its configured provider API and return readiness and checkpoint evidence.", AnalyticsReconcileConnectionInputSchema, "analyticsReconcileConnection", false, true, false, true]
@@ -13834,7 +13838,8 @@ var HttpMcpToolExecutor = class {
13834
13838
  return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/event-definitions/${encodeURIComponent(definitionId)}/test`, body, this.timeoutMs, "POST");
13835
13839
  }
13836
13840
  analyticsTestActivationDestination(input) {
13837
- return this.call(`/analytics/sites/${encodeURIComponent(input.siteId)}/activation-destinations/${encodeURIComponent(input.destinationId)}/test`, {}, this.timeoutMs, "POST");
13841
+ const { siteId, destinationId, ...body } = input;
13842
+ return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/activation-destinations/${encodeURIComponent(destinationId)}/test`, body, this.timeoutMs, "POST");
13838
13843
  }
13839
13844
  analyticsListActivationReceipts(input) {
13840
13845
  const query = new URLSearchParams({ limit: String(input.limit) });
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var PACKAGE_VERSION = "0.69.0";
2
+ var PACKAGE_VERSION = "0.69.1";
3
3
 
4
4
  export {
5
5
  PACKAGE_VERSION
@@ -232,7 +232,7 @@ import {
232
232
  resolveDeploymentProfile,
233
233
  resolveLocalSourcebookSchemaType,
234
234
  transcribeMediaUrl
235
- } from "./chunk-M7D7WO75.js";
235
+ } from "./chunk-2LMMZUU5.js";
236
236
  import {
237
237
  auditImageUrls,
238
238
  auditImages,
@@ -289,7 +289,7 @@ import {
289
289
  } from "./chunk-GGZEC22A.js";
290
290
  import {
291
291
  PACKAGE_VERSION
292
- } from "./chunk-ULYOCJUJ.js";
292
+ } from "./chunk-RODSHBN7.js";
293
293
  import {
294
294
  SITE_EXTRACT_ARTIFACT_PREFIX,
295
295
  abandonExtractSettlement,
@@ -48544,6 +48544,26 @@ analyticsApp.get("/sites/:siteId/activation-assets", auth3, async (c) => {
48544
48544
  if (!discoveryAction) {
48545
48545
  return c.json({ ok: true, platform: platform.data, requiredDestinationField: definition.requiredDestinationField, assets: [], manualEntryAllowed: true, discovery: "not_advertised" }, 200, noStore);
48546
48546
  }
48547
+ if (platform.data === "meta" && discoveryAction === "list-datasets") {
48548
+ if (!advertised.includes("list-ad-accounts")) {
48549
+ return c.json({ ok: true, platform: platform.data, requiredDestinationField: definition.requiredDestinationField, assets: [], manualEntryAllowed: true, discovery: "account_discovery_not_advertised" }, 200, noStore);
48550
+ }
48551
+ const accountResult = await callScheduleConnectionAction(user.email, connectionRef, { limit: 25 }, "list-ad-accounts");
48552
+ const accountRoot = accountResult && typeof accountResult === "object" ? accountResult : {};
48553
+ const accounts = Array.isArray(accountRoot.adAccounts) ? accountRoot.adAccounts : [];
48554
+ const accountIds = accounts.flatMap((item) => {
48555
+ if (!item || typeof item !== "object") return [];
48556
+ const record = item;
48557
+ const id = [record.id, record.accountId, record.account_id].find((entry) => typeof entry === "string" && entry.trim());
48558
+ return id ? [id.slice(0, 240)] : [];
48559
+ }).slice(0, 25);
48560
+ const datasets = (await Promise.all(accountIds.map(async (adAccountId) => {
48561
+ const result = await callScheduleConnectionAction(user.email, connectionRef, { adAccountId, limit: 100 }, discoveryAction);
48562
+ return safeActivationAssets(result);
48563
+ }))).flat();
48564
+ const uniqueAssets = [...new Map(datasets.map((asset) => [asset.id, asset])).values()].slice(0, 500);
48565
+ return c.json({ ok: true, platform: platform.data, requiredDestinationField: definition.requiredDestinationField, assets: uniqueAssets, manualEntryAllowed: true, discovery: "authorized_provider" }, 200, noStore);
48566
+ }
48547
48567
  const raw = await callScheduleConnectionAction(user.email, connectionRef, { platform: platform.data }, discoveryAction);
48548
48568
  return c.json({ ok: true, platform: platform.data, requiredDestinationField: definition.requiredDestinationField, assets: safeActivationAssets(raw), manualEntryAllowed: true, discovery: "authorized_provider" }, 200, noStore);
48549
48569
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-scraper",
3
- "version": "0.69.0",
3
+ "version": "0.69.1",
4
4
  "description": "MCP server for MCP Scraper web intelligence tools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",