mcp-scraper 0.73.0 → 0.73.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,13 @@ All notable changes to MCP Scraper are documented here. The format is based on [
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.73.1] - 2026-08-28
8
+
9
+ ### Fixed
10
+
11
+ - Applied additive, idempotent X-Ray schema changes as individually committed statements so production reads cannot deadlock against a release-long DDL transaction and an interrupted migration can resume safely.
12
+ - Reused the earliest confirmed person when a verified email, phone, account ID, or order identity already belongs to the Site graph, preventing a normalized account ID from splitting a legacy email-keyed journey.
13
+
7
14
  ## [0.73.0] - 2026-08-27
8
15
 
9
16
  ### Added
@@ -27,6 +34,7 @@ All notable changes to MCP Scraper are documented here. The format is based on [
27
34
  - Prevented cross-Site identity, privacy, and Journey references; removed subject-specific export/provider payload remnants on withdrawal or deletion; and normalized unknown/deleted references to zero-discovery responses.
28
35
  - Normalized PostgreSQL timestamp projections and reconciled consent-withdrawal responses with the strict public REST contract.
29
36
  - Made consented login and first-party form resolution self-initialize an approved Site-scoped primary identity graph, so older Sites persist stable person references and masked profiles without manual namespace setup.
37
+ - Retried the authenticated browser identity handoff during the bounded Pixel/consent bootstrap window, preventing a consent-readiness race from leaving a signed-in visitor anonymous for the rest of the page.
30
38
 
31
39
  ## [0.72.7] - 2026-08-27
32
40
 
@@ -1308,7 +1316,8 @@ All notable changes to MCP Scraper are documented here. The format is based on [
1308
1316
  - Write actions remain unavailable until the account owner explicitly enables them.
1309
1317
  - Provider-specific connection data is normalized into one agent-facing contract.
1310
1318
 
1311
- [Unreleased]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.73.0...HEAD
1319
+ [Unreleased]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.73.1...HEAD
1320
+ [0.73.1]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.73.0...v0.73.1
1312
1321
  [0.73.0]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.72.7...v0.73.0
1313
1322
  [0.72.7]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.72.6...v0.72.7
1314
1323
  [0.72.6]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.72.5...v0.72.6
package/README.md CHANGED
@@ -173,7 +173,7 @@ Build the branded one-click bundle:
173
173
  npm run build:mcpb
174
174
  ```
175
175
 
176
- 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.73.0`, SHA-256 `570d31a9b16833b89de8ea5296e5d97b3d4696336c94651739b716a0bda81ce6`). 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.
176
+ 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.73.1`, SHA-256 `6d28c003fa95efba8867529ea8b9546e1213bbbe0575f03342b8bbe054535550`). 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.
177
177
 
178
178
  The MCPB install exposes every tool — web-intelligence plus all `browser_*` tools — through the one `mcp-scraper` server.
179
179
 
@@ -84,7 +84,7 @@ import {
84
84
  updateAnalyticsPixel,
85
85
  upsertAnalyticsAdSpend,
86
86
  upsertAnalyticsHostGroup
87
- } from "./chunk-5EWXRBEH.js";
87
+ } from "./chunk-M6XDENOO.js";
88
88
  import "./chunk-PJEEKOUM.js";
89
89
  import "./chunk-WEFPBAAG.js";
90
90
  export {
@@ -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-N6MCRSQW.js"),
20
+ import("../server-663CRTGY.js"),
21
21
  import("../worker-CBK5DWEE.js"),
22
22
  import("../db-566MOHHD.js")
23
23
  ]);
@@ -25,7 +25,7 @@ async function main() {
25
25
  try {
26
26
  await migrate();
27
27
  if (process.env.ANALYTICS_DATABASE_URL) {
28
- const { migrateAnalytics } = await import("../analytics-repository-MSLJBHLU.js");
28
+ const { migrateAnalytics } = await import("../analytics-repository-7XYPQ2YJ.js");
29
29
  await migrateAnalytics();
30
30
  }
31
31
  startWorker();
@@ -13,7 +13,7 @@ import "../chunk-VXLU74YZ.js";
13
13
  import "../chunk-GGZEC22A.js";
14
14
  import {
15
15
  PACKAGE_VERSION
16
- } from "../chunk-JIWGG7Z4.js";
16
+ } from "../chunk-NLPFY2IF.js";
17
17
 
18
18
  // src/cli/human-cli.ts
19
19
  import { Command } from "commander";
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-Q2J23DHY.js";
5
5
  import {
6
6
  PACKAGE_VERSION
7
- } from "../chunk-JIWGG7Z4.js";
7
+ } from "../chunk-NLPFY2IF.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;
@@ -13,7 +13,7 @@ import {
13
13
  registerScheduledResultsMcpTools,
14
14
  registerSerpIntelligenceCaptureTools,
15
15
  resolveDeploymentProfile
16
- } from "../chunk-KRIIVDV2.js";
16
+ } from "../chunk-G75QXTBE.js";
17
17
  import "../chunk-PGJQDMC2.js";
18
18
  import "../chunk-T3MZISOF.js";
19
19
  import "../chunk-7RQULQF3.js";
@@ -26,7 +26,7 @@ import "../chunk-VXLU74YZ.js";
26
26
  import "../chunk-GGZEC22A.js";
27
27
  import {
28
28
  PACKAGE_VERSION
29
- } from "../chunk-JIWGG7Z4.js";
29
+ } from "../chunk-NLPFY2IF.js";
30
30
  import "../chunk-DNM65UCK.js";
31
31
  import "../chunk-EQJRPDUS.js";
32
32
  import "../chunk-WEFPBAAG.js";
@@ -32,7 +32,7 @@ import {
32
32
  } from "./chunk-VXLU74YZ.js";
33
33
  import {
34
34
  PACKAGE_VERSION
35
- } from "./chunk-JIWGG7Z4.js";
35
+ } from "./chunk-NLPFY2IF.js";
36
36
  import {
37
37
  createPrivateArtifact,
38
38
  privateArtifactOwnerId,
@@ -860,7 +860,6 @@ async function closeAnalyticsPool() {
860
860
  async function migrateAnalytics() {
861
861
  const db = getAnalyticsPool();
862
862
  const client = await db.connect();
863
- await client.query("BEGIN");
864
863
  try {
865
864
  await client.query(`
866
865
  CREATE TABLE IF NOT EXISTS analytics_schema_migrations (
@@ -2607,9 +2606,7 @@ async function migrateAnalytics() {
2607
2606
  VALUES ('2026-08-05.1'), ('2026-08-05.2'), ('2026-08-05.3'), ('2026-08-05.4'), ('2026-08-05.5'), ('2026-08-05.6'), ('2026-08-05.7'), ('2026-08-05.8'), ('2026-08-05.9'), ('2026-08-05.10'), ('2026-08-05.11'), ('2026-08-05.12'), ('2026-08-05.13'), ('2026-08-05.14'), ('2026-08-26.1'), ('2026-08-26.2'), ('2026-08-26.3'), ('2026-08-26.4'), ('2026-08-27.1')
2608
2607
  ON CONFLICT (version) DO NOTHING
2609
2608
  `);
2610
- await client.query("COMMIT");
2611
2609
  } catch (error) {
2612
- await client.query("ROLLBACK");
2613
2610
  throw error;
2614
2611
  } finally {
2615
2612
  client.release();
@@ -4903,6 +4900,140 @@ async function backfillAnalyticsConfirmedHistory(client, input) {
4903
4900
  conversions: conversions.rowCount ?? 0
4904
4901
  };
4905
4902
  }
4903
+ async function resolveAndMergeConfirmedAnalyticsPerson(client, input) {
4904
+ const matches = await client.query(
4905
+ `SELECT p.id
4906
+ FROM analytics_people p
4907
+ JOIN (
4908
+ SELECT DISTINCT e.person_id
4909
+ FROM analytics_identity_nodes n
4910
+ JOIN analytics_identity_edges e ON e.identity_node_id=n.id AND e.site_id=n.site_id
4911
+ WHERE n.site_id=$1 AND EXISTS (
4912
+ SELECT 1 FROM jsonb_to_recordset($2::jsonb) signal(kind text,value_hmac text)
4913
+ WHERE signal.kind=n.kind AND signal.value_hmac=n.value_hmac
4914
+ )
4915
+ ) matched ON matched.person_id=p.id
4916
+ WHERE p.site_id=$1 AND (p.namespace_id=$3 OR p.namespace_id IS NULL)
4917
+ ORDER BY p.first_seen_at ASC,p.id ASC
4918
+ FOR UPDATE OF p`,
4919
+ [
4920
+ input.siteId,
4921
+ JSON.stringify(input.signals.map((signal) => ({ kind: signal.kind, value_hmac: signal.valueHmac }))),
4922
+ input.namespaceId
4923
+ ]
4924
+ );
4925
+ const canonicalId = matches.rows[0]?.id;
4926
+ if (!canonicalId) {
4927
+ const inserted = await client.query(
4928
+ `INSERT INTO analytics_people(id, site_id, namespace_id, crm_person_ref, public_ref) VALUES ($1,$2,$3,$4,$5)
4929
+ ON CONFLICT(site_id, crm_person_ref) DO UPDATE SET last_seen_at = now(),
4930
+ namespace_id=COALESCE(analytics_people.namespace_id,EXCLUDED.namespace_id),
4931
+ public_ref=COALESCE(analytics_people.public_ref,EXCLUDED.public_ref) RETURNING id`,
4932
+ [randomUUID2(), input.siteId, input.namespaceId, input.crmPersonRef, newAnalyticsPersonPublicRef()]
4933
+ );
4934
+ return inserted.rows[0].id;
4935
+ }
4936
+ await client.query(
4937
+ `UPDATE analytics_people SET last_seen_at=now(),
4938
+ namespace_id=COALESCE(namespace_id,$2),public_ref=COALESCE(public_ref,$3)
4939
+ WHERE id=$1 AND site_id=$4`,
4940
+ [canonicalId, input.namespaceId, newAnalyticsPersonPublicRef(), input.siteId]
4941
+ );
4942
+ const duplicateIds = matches.rows.slice(1).map((row) => row.id);
4943
+ if (duplicateIds.length === 0) return canonicalId;
4944
+ await client.query(
4945
+ `DELETE FROM analytics_identity_edges duplicate
4946
+ USING analytics_identity_edges canonical
4947
+ WHERE duplicate.site_id=$1 AND duplicate.person_id=ANY($2::uuid[])
4948
+ AND canonical.site_id=duplicate.site_id AND canonical.person_id=$3
4949
+ AND canonical.identity_node_id=duplicate.identity_node_id
4950
+ AND canonical.evidence_kind=duplicate.evidence_kind`,
4951
+ [input.siteId, duplicateIds, canonicalId]
4952
+ );
4953
+ await client.query(
4954
+ `UPDATE analytics_identity_edges SET person_id=$3,namespace_id=$4
4955
+ WHERE site_id=$1 AND person_id=ANY($2::uuid[])`,
4956
+ [input.siteId, duplicateIds, canonicalId, input.namespaceId]
4957
+ );
4958
+ for (const table of [
4959
+ "analytics_form_submissions",
4960
+ "analytics_events",
4961
+ "analytics_conversions",
4962
+ "analytics_sessions",
4963
+ "analytics_attribution_touches",
4964
+ "analytics_external_events",
4965
+ "analytics_restricted_data",
4966
+ "analytics_crm_outbound_jobs"
4967
+ ]) {
4968
+ await client.query(
4969
+ `UPDATE ${table} SET person_id=$3 WHERE site_id=$1 AND person_id=ANY($2::uuid[])`,
4970
+ [input.siteId, duplicateIds, canonicalId]
4971
+ );
4972
+ }
4973
+ await client.query(
4974
+ "UPDATE analytics_activation_jobs SET person_id=$2 WHERE person_id=ANY($1::uuid[])",
4975
+ [duplicateIds, canonicalId]
4976
+ );
4977
+ await client.query(
4978
+ `UPDATE analytics_candidate_associations SET promoted_person_id=$3,namespace_id=$4
4979
+ WHERE site_id=$1 AND promoted_person_id=ANY($2::uuid[])`,
4980
+ [input.siteId, duplicateIds, canonicalId, input.namespaceId]
4981
+ );
4982
+ await client.query(
4983
+ `DELETE FROM analytics_candidate_promotions duplicate
4984
+ USING analytics_candidate_promotions canonical
4985
+ WHERE duplicate.site_id=$1 AND duplicate.person_id=ANY($2::uuid[])
4986
+ AND canonical.site_id=duplicate.site_id AND canonical.person_id=$3
4987
+ AND canonical.association_id=duplicate.association_id`,
4988
+ [input.siteId, duplicateIds, canonicalId]
4989
+ );
4990
+ await client.query(
4991
+ `UPDATE analytics_candidate_promotions SET person_id=$3,namespace_id=$4
4992
+ WHERE site_id=$1 AND person_id=ANY($2::uuid[])`,
4993
+ [input.siteId, duplicateIds, canonicalId, input.namespaceId]
4994
+ );
4995
+ await client.query(
4996
+ `DELETE FROM analytics_crm_person_mappings duplicate
4997
+ USING analytics_crm_person_mappings canonical
4998
+ WHERE duplicate.site_id=$1 AND duplicate.person_id=ANY($2::uuid[])
4999
+ AND canonical.site_id=duplicate.site_id AND canonical.person_id=$3
5000
+ AND canonical.connection_id=duplicate.connection_id`,
5001
+ [input.siteId, duplicateIds, canonicalId]
5002
+ );
5003
+ await client.query(
5004
+ `UPDATE analytics_crm_person_mappings SET person_id=$3,namespace_id=$4
5005
+ WHERE site_id=$1 AND person_id=ANY($2::uuid[])`,
5006
+ [input.siteId, duplicateIds, canonicalId, input.namespaceId]
5007
+ );
5008
+ await client.query(
5009
+ `DELETE FROM analytics_prediction_results duplicate
5010
+ USING analytics_prediction_results canonical
5011
+ WHERE duplicate.site_id=$1 AND duplicate.person_id=ANY($2::uuid[])
5012
+ AND canonical.site_id=duplicate.site_id AND canonical.person_id=$3
5013
+ AND canonical.manifest_id=duplicate.manifest_id`,
5014
+ [input.siteId, duplicateIds, canonicalId]
5015
+ );
5016
+ for (const table of ["analytics_score_evaluations", "analytics_prediction_results"]) {
5017
+ await client.query(
5018
+ `UPDATE ${table} SET person_id=$3,namespace_id=$4
5019
+ WHERE site_id=$1 AND person_id=ANY($2::uuid[])`,
5020
+ [input.siteId, duplicateIds, canonicalId, input.namespaceId]
5021
+ );
5022
+ }
5023
+ await client.query(
5024
+ "UPDATE analytics_identity_profile_access_audits SET person_id=$3 WHERE site_id=$1 AND person_id=ANY($2::uuid[])",
5025
+ [input.siteId, duplicateIds, canonicalId]
5026
+ );
5027
+ await client.query(
5028
+ "UPDATE analytics_identity_tombstones SET person_id=$3 WHERE site_id=$1 AND person_id=ANY($2::uuid[])",
5029
+ [input.siteId, duplicateIds, canonicalId]
5030
+ );
5031
+ await client.query(
5032
+ "DELETE FROM analytics_people WHERE site_id=$1 AND id=ANY($2::uuid[])",
5033
+ [input.siteId, duplicateIds]
5034
+ );
5035
+ return canonicalId;
5036
+ }
4906
5037
  async function linkAnalyticsIdentityInTransaction(client, input) {
4907
5038
  const stable = input.customerId || input.orderId || input.email || input.phone;
4908
5039
  if (!stable) return null;
@@ -4924,14 +5055,12 @@ async function linkAnalyticsIdentityInTransaction(client, input) {
4924
5055
  signals: tombstoneSignals
4925
5056
  });
4926
5057
  const crmPersonRef = `XRay::${identityHmac("person_ref", stable).slice(0, 24)}`;
4927
- const person = await client.query(
4928
- `INSERT INTO analytics_people(id, site_id, namespace_id, crm_person_ref, public_ref) VALUES ($1,$2,$3,$4,$5)
4929
- ON CONFLICT(site_id, crm_person_ref) DO UPDATE SET last_seen_at = now(),
4930
- namespace_id=COALESCE(analytics_people.namespace_id,EXCLUDED.namespace_id),
4931
- public_ref=COALESCE(analytics_people.public_ref,EXCLUDED.public_ref) RETURNING id`,
4932
- [randomUUID2(), input.siteId, namespaceId, crmPersonRef, newAnalyticsPersonPublicRef()]
4933
- );
4934
- const personId = person.rows[0].id;
5058
+ const personId = await resolveAndMergeConfirmedAnalyticsPerson(client, {
5059
+ siteId: input.siteId,
5060
+ namespaceId,
5061
+ crmPersonRef,
5062
+ signals: tombstoneSignals
5063
+ });
4935
5064
  const signals = [];
4936
5065
  if (input.visitorId)
4937
5066
  signals.push({ kind: "visitor_id", value: input.visitorId, evidence: "pixel_identify", confidence: 0.98 });
@@ -4995,21 +5124,20 @@ async function linkAnalyticsFormIdentity(input) {
4995
5124
  return { personId: null, linkedSignals: 0 };
4996
5125
  }
4997
5126
  const namespaceId = await ensurePrimaryAnalyticsIdentityNamespace(client, input.siteId, "form");
5127
+ const deterministicSignals = [
5128
+ ...input.email ? [{ kind: "email", valueHmac: identityHmac("email", input.email) }] : [],
5129
+ ...input.phone ? [{ kind: "phone", valueHmac: identityHmac("phone", input.phone) }] : []
5130
+ ];
4998
5131
  await assertAnalyticsIdentitySignalsNotTombstoned(client, {
4999
5132
  siteId: input.siteId,
5000
- signals: [
5001
- ...input.email ? [{ kind: "email", valueHmac: identityHmac("email", input.email) }] : [],
5002
- ...input.phone ? [{ kind: "phone", valueHmac: identityHmac("phone", input.phone) }] : []
5003
- ]
5133
+ signals: deterministicSignals
5134
+ });
5135
+ const personId = await resolveAndMergeConfirmedAnalyticsPerson(client, {
5136
+ siteId: input.siteId,
5137
+ namespaceId,
5138
+ crmPersonRef: input.crmPersonRef,
5139
+ signals: deterministicSignals
5004
5140
  });
5005
- const person = await client.query(
5006
- `INSERT INTO analytics_people(id, site_id, namespace_id, crm_person_ref, public_ref) VALUES ($1,$2,$3,$4,$5)
5007
- ON CONFLICT(site_id, crm_person_ref) DO UPDATE SET last_seen_at = now(),
5008
- namespace_id=COALESCE(analytics_people.namespace_id,EXCLUDED.namespace_id),
5009
- public_ref=COALESCE(analytics_people.public_ref,EXCLUDED.public_ref) RETURNING id`,
5010
- [randomUUID2(), input.siteId, namespaceId, input.crmPersonRef, newAnalyticsPersonPublicRef()]
5011
- );
5012
- const personId = person.rows[0].id;
5013
5141
  const signals = [];
5014
5142
  if (input.visitorId)
5015
5143
  signals.push({
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var PACKAGE_VERSION = "0.73.0";
2
+ var PACKAGE_VERSION = "0.73.1";
3
3
 
4
4
  export {
5
5
  PACKAGE_VERSION
@@ -153,7 +153,7 @@ import {
153
153
  upsertAnalyticsAdSpend,
154
154
  upsertAnalyticsHostGroup,
155
155
  verifyAnalyticsWebhookSignature
156
- } from "./chunk-5EWXRBEH.js";
156
+ } from "./chunk-M6XDENOO.js";
157
157
  import {
158
158
  claimServiceConnectionAction,
159
159
  ensureServiceConnectionsSchema,
@@ -280,7 +280,7 @@ import {
280
280
  resolveDeploymentProfile,
281
281
  resolveLocalSourcebookSchemaType,
282
282
  transcribeMediaUrl
283
- } from "./chunk-KRIIVDV2.js";
283
+ } from "./chunk-G75QXTBE.js";
284
284
  import {
285
285
  auditImageUrls,
286
286
  auditImages,
@@ -345,7 +345,7 @@ import {
345
345
  } from "./chunk-GGZEC22A.js";
346
346
  import {
347
347
  PACKAGE_VERSION
348
- } from "./chunk-JIWGG7Z4.js";
348
+ } from "./chunk-NLPFY2IF.js";
349
349
  import {
350
350
  SITE_EXTRACT_ARTIFACT_PREFIX,
351
351
  abandonExtractSettlement,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-scraper",
3
- "version": "0.73.0",
3
+ "version": "0.73.1",
4
4
  "description": "MCP server for MCP Scraper web intelligence tools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",