mcp-scraper 0.86.0 → 0.86.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 +9 -0
- package/README.md +1 -1
- package/dist/bin/api-server.js +1 -1
- package/dist/bin/mcp-scraper-cli.js +1 -1
- package/dist/bin/mcp-scraper-core.js +4 -4
- package/dist/bin/mcp-scraper-install.js +2 -2
- package/dist/bin/mcp-stdio-server.js +4 -4
- package/dist/{chunk-FBB6DEUV.js → chunk-3H7QTJLV.js} +7 -7
- package/dist/{chunk-7523VOQT.js → chunk-3JRZZVWL.js} +1 -1
- package/dist/{chunk-36EAKRR6.js → chunk-C4C4WUTV.js} +1 -1
- package/dist/{chunk-QKWNEMGH.js → chunk-TYLVUAK3.js} +3 -3
- package/dist/{server-OZBTZIDZ.js → server-UQ33P5V5.js} +94 -39
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ All notable changes to MCP Scraper are documented here. The format is based on [
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.86.1] - 2026-09-02
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Retried Reddit thread hydration through as many as two fresh primary residential sessions and two bounded managed-browser backup sessions, stopping after the first accepted result while retaining per-attempt provider and cost telemetry.
|
|
12
|
+
- Restored visually hidden accessible labels for native CRM and Research search, select, submit, deal-stage, and X-Ray evidence controls.
|
|
13
|
+
- Prevented the native CRM and Research toolbar from stretching into a full-height column at tablet and phone breakpoints.
|
|
14
|
+
- Routed the native `/research/*` and `/crm/*` REST facades through the production API function instead of allowing the canonical host to fall through to a 404.
|
|
15
|
+
|
|
7
16
|
## [0.86.0] - 2026-09-01
|
|
8
17
|
|
|
9
18
|
### 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.86.
|
|
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.86.1`, SHA-256 `c735311afd38095d4187fb5cbb79e5abed47b7c09d78e56ee6c2ecacd1b9270f`). 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
|
|
package/dist/bin/api-server.js
CHANGED
|
@@ -17,7 +17,7 @@ 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-
|
|
20
|
+
import("../server-UQ33P5V5.js"),
|
|
21
21
|
import("../worker-OQSFSLNG.js"),
|
|
22
22
|
import("../db-Z34LPZNR.js")
|
|
23
23
|
]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runMcpScraperStdio
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-TYLVUAK3.js";
|
|
5
|
+
import "../chunk-3H7QTJLV.js";
|
|
6
6
|
import "../chunk-PGJQDMC2.js";
|
|
7
7
|
import "../chunk-DNM65UCK.js";
|
|
8
8
|
import "../chunk-T3MZISOF.js";
|
|
@@ -10,10 +10,10 @@ import "../chunk-6HAV7LCE.js";
|
|
|
10
10
|
import "../chunk-NKRO2SUO.js";
|
|
11
11
|
import "../chunk-OM7HVEJ3.js";
|
|
12
12
|
import "../chunk-OPQIGAFB.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-3JRZZVWL.js";
|
|
14
14
|
import "../chunk-P7FWOMU7.js";
|
|
15
15
|
import "../chunk-GGZEC22A.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-C4C4WUTV.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-
|
|
4
|
+
} from "../chunk-3JRZZVWL.js";
|
|
5
5
|
import {
|
|
6
6
|
PACKAGE_VERSION
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-C4C4WUTV.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,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runMcpScraperStdio
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-TYLVUAK3.js";
|
|
5
|
+
import "../chunk-3H7QTJLV.js";
|
|
6
6
|
import "../chunk-PGJQDMC2.js";
|
|
7
7
|
import "../chunk-DNM65UCK.js";
|
|
8
8
|
import "../chunk-T3MZISOF.js";
|
|
@@ -10,10 +10,10 @@ import "../chunk-6HAV7LCE.js";
|
|
|
10
10
|
import "../chunk-NKRO2SUO.js";
|
|
11
11
|
import "../chunk-OM7HVEJ3.js";
|
|
12
12
|
import "../chunk-OPQIGAFB.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-3JRZZVWL.js";
|
|
14
14
|
import "../chunk-P7FWOMU7.js";
|
|
15
15
|
import "../chunk-GGZEC22A.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-C4C4WUTV.js";
|
|
17
17
|
import "../chunk-YXNDOQXN.js";
|
|
18
18
|
|
|
19
19
|
// bin/mcp-stdio-server.ts
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
} from "./chunk-P7FWOMU7.js";
|
|
51
51
|
import {
|
|
52
52
|
PACKAGE_VERSION
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-C4C4WUTV.js";
|
|
54
54
|
import {
|
|
55
55
|
PUBLIC_ERROR_CODES,
|
|
56
56
|
buildPublicErrorEnvelope,
|
|
@@ -5732,13 +5732,13 @@ seam is noted so you can chain them.
|
|
|
5732
5732
|
|
|
5733
5733
|
## Reddit
|
|
5734
5734
|
- Read ONE known reddit.com thread/post URL -> **reddit_thread**. It opens current Reddit through a managed
|
|
5735
|
-
residential browser and returns a bounded rendered comment tree.
|
|
5736
|
-
backup can recover the post and up to 25 comments.
|
|
5735
|
+
residential browser and returns a bounded rendered comment tree. It makes up to two fresh primary attempts,
|
|
5736
|
+
then up to two managed-browser backup attempts that can recover the post and up to 25 comments.
|
|
5737
5737
|
- DISCOVER what a niche is talking about (topic, no known thread) -> **reddit_trending** (takes a topic, optional
|
|
5738
5738
|
subreddit and a week, 30-day, or all-time window; returns top threads ranked by engagement plus the questions people asked \u2014
|
|
5739
5739
|
feed winning \`rankedThreads[].url\` values into \`reddit_thread\` for the full comment tree). It uses a site-restricted
|
|
5740
|
-
web search, then opens selected threads on current Reddit through managed residential browsers; each
|
|
5741
|
-
|
|
5740
|
+
web search, then opens selected threads on current Reddit through managed residential browsers; each hydration uses the same two-primary,
|
|
5741
|
+
two-backup ladder, with the backup capped at 25 comments. Before interpreting an empty result, inspect
|
|
5742
5742
|
\`resultQuality\`, \`discoverySource\`, \`degradationReasons\`, \`retryRecommended\`, and \`billingRefunded\`;
|
|
5743
5743
|
a degraded empty result is not evidence that the topic has no Reddit discussion.
|
|
5744
5744
|
|
|
@@ -17452,14 +17452,14 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
|
|
|
17452
17452
|
}, async (input) => formatFacebookAdSearch(await executor.facebookAdSearch(input), input));
|
|
17453
17453
|
server.registerTool("reddit_thread", {
|
|
17454
17454
|
title: "Reddit Thread + Comments",
|
|
17455
|
-
description: "Read one known reddit.com post and its rendered comment tree on current Reddit.
|
|
17455
|
+
description: "Read one known reddit.com post and its rendered comment tree on current Reddit. It makes up to two fresh managed residential browser attempts, then up to two managed-browser backup attempts that can recover the post and 25 comments, stopping on the first accepted result. Use reddit_trending when no thread URL is known. Costs one Reddit base lookup plus the per-comment rate for comments returned; pass maxComments to bound both output and cost.",
|
|
17456
17456
|
inputSchema: RedditThreadInputSchema,
|
|
17457
17457
|
outputSchema: recordOutputSchema("reddit_thread", RedditThreadOutputSchema),
|
|
17458
17458
|
annotations: liveWebToolAnnotations("Reddit Thread + Comments")
|
|
17459
17459
|
}, async (input) => formatRedditThread(await executor.redditThread(input), input));
|
|
17460
17460
|
server.registerTool("reddit_trending", {
|
|
17461
17461
|
title: "Reddit Trending",
|
|
17462
|
-
description: "Discover Reddit conversations through a site-restricted web search for the last week, month, or all time. With includeComments:true, each candidate is
|
|
17462
|
+
description: "Discover Reddit conversations through a site-restricted web search for the last week, month, or all time. With includeComments:true, each candidate is hydrated with up to two fresh managed residential browser attempts followed by up to two managed-browser backup attempts capped at 25 comments, stopping on the first accepted result, and ranked from rendered engagement; discovery, each hydrated thread, and returned comments are billed separately. Set includeComments:false for the faster discovery-only result, and inspect resultQuality and discoverySource before treating an empty result as meaningful.",
|
|
17463
17463
|
inputSchema: RedditTrendingInputSchema,
|
|
17464
17464
|
outputSchema: recordOutputSchema("reddit_trending", RedditTrendingOutputSchema),
|
|
17465
17465
|
annotations: liveWebToolAnnotations("Reddit Trending")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// release-message.json
|
|
2
2
|
var release_message_default = {
|
|
3
|
-
message: "
|
|
3
|
+
message: "Reddit thread hydration now retries two fresh residential sessions and two managed-browser backups, stopping at the first accepted result while preserving attempt and provider-cost telemetry."
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
// src/install-terminal.ts
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
registerScheduledResultsMcpTools,
|
|
13
13
|
registerSerpIntelligenceCaptureTools,
|
|
14
14
|
resolveDeploymentProfile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3H7QTJLV.js";
|
|
16
16
|
import {
|
|
17
17
|
renderInstallTerminal
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3JRZZVWL.js";
|
|
19
19
|
import {
|
|
20
20
|
PACKAGE_VERSION
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-C4C4WUTV.js";
|
|
22
22
|
|
|
23
23
|
// src/mcp/stdio-runtime.ts
|
|
24
24
|
import { readFileSync } from "fs";
|
|
@@ -388,7 +388,7 @@ import {
|
|
|
388
388
|
transcribeMediaUrl,
|
|
389
389
|
transitionAnalyticsExperiment,
|
|
390
390
|
validateAnalyticsRestResponseForRequest
|
|
391
|
-
} from "./chunk-
|
|
391
|
+
} from "./chunk-3H7QTJLV.js";
|
|
392
392
|
import {
|
|
393
393
|
auditImageUrls,
|
|
394
394
|
auditImages,
|
|
@@ -509,7 +509,7 @@ import {
|
|
|
509
509
|
} from "./chunk-GGZEC22A.js";
|
|
510
510
|
import {
|
|
511
511
|
PACKAGE_VERSION
|
|
512
|
-
} from "./chunk-
|
|
512
|
+
} from "./chunk-C4C4WUTV.js";
|
|
513
513
|
import {
|
|
514
514
|
CaptchaError,
|
|
515
515
|
MapsSearchIncompletePageError,
|
|
@@ -21499,25 +21499,36 @@ async function recordPendingBrightDataRedditUsage(providerSessionId, telemetry)
|
|
|
21499
21499
|
async function refreshFinalizedRedditProbeCosts() {
|
|
21500
21500
|
const db = getDb();
|
|
21501
21501
|
const probes = await db.execute({
|
|
21502
|
-
sql: `SELECT v.probe_run_id,
|
|
21502
|
+
sql: `SELECT v.probe_run_id,
|
|
21503
|
+
SUM(CASE WHEN v.method = ? THEN v.est_cost_usd ELSE 0 END) AS cost,
|
|
21504
|
+
SUM(CASE WHEN v.method = ? THEN 1 ELSE 0 END) AS pending_count
|
|
21503
21505
|
FROM vendor_usage_log v JOIN cost_probe_runs p ON p.id = v.probe_run_id
|
|
21504
|
-
WHERE v.
|
|
21506
|
+
WHERE v.vendor = 'brightdata_browser_api' AND v.method IN (?, ?) AND v.probe_run_id IS NOT NULL
|
|
21505
21507
|
GROUP BY v.probe_run_id
|
|
21506
|
-
HAVING ABS(SUM(v.est_cost_usd) - MAX(p.vendor_cost_usd)) > 0.000000000001
|
|
21507
|
-
OR MAX(CASE WHEN json_valid(p.notes) THEN json_extract(p.notes, '$.providerCostPending') ELSE 0 END)
|
|
21508
|
+
HAVING ABS(SUM(CASE WHEN v.method = ? THEN v.est_cost_usd ELSE 0 END) - MAX(p.vendor_cost_usd)) > 0.000000000001
|
|
21509
|
+
OR MAX(CASE WHEN json_valid(p.notes) THEN COALESCE(json_extract(p.notes, '$.providerCostPending'), 0) ELSE 0 END)
|
|
21510
|
+
!= CASE WHEN SUM(CASE WHEN v.method = ? THEN 1 ELSE 0 END) > 0 THEN 1 ELSE 0 END
|
|
21508
21511
|
LIMIT 100`,
|
|
21509
|
-
args: [
|
|
21512
|
+
args: [
|
|
21513
|
+
REDDIT_COMPLETE_METHOD,
|
|
21514
|
+
REDDIT_PENDING_METHOD,
|
|
21515
|
+
REDDIT_COMPLETE_METHOD,
|
|
21516
|
+
REDDIT_PENDING_METHOD,
|
|
21517
|
+
REDDIT_COMPLETE_METHOD,
|
|
21518
|
+
REDDIT_PENDING_METHOD
|
|
21519
|
+
]
|
|
21510
21520
|
});
|
|
21511
21521
|
for (const probe of probes.rows) {
|
|
21512
21522
|
const cost = Number(probe.cost ?? 0);
|
|
21523
|
+
const providerCostPending = Number(probe.pending_count ?? 0) > 0;
|
|
21513
21524
|
await db.execute({
|
|
21514
21525
|
sql: `UPDATE cost_probe_runs SET
|
|
21515
21526
|
margin_usd_headless_starter = margin_usd_headless_starter - (? - vendor_cost_usd),
|
|
21516
21527
|
margin_usd_headful_starter = margin_usd_headful_starter - (? - vendor_cost_usd),
|
|
21517
21528
|
vendor_cost_usd = ?,
|
|
21518
|
-
notes = CASE WHEN json_valid(notes) THEN json_set(notes, '$.providerCostPending', json(
|
|
21529
|
+
notes = CASE WHEN json_valid(notes) THEN json_set(notes, '$.providerCostPending', json(?)) ELSE notes END
|
|
21519
21530
|
WHERE id = ?`,
|
|
21520
|
-
args: [cost, cost, cost, probe.probe_run_id]
|
|
21531
|
+
args: [cost, cost, cost, providerCostPending ? "true" : "false", probe.probe_run_id]
|
|
21521
21532
|
});
|
|
21522
21533
|
}
|
|
21523
21534
|
}
|
|
@@ -21725,39 +21736,77 @@ async function runBrightDataRedditThreadBackup(url2, requestedComments) {
|
|
|
21725
21736
|
|
|
21726
21737
|
// src/reddit/thread-retrieval.ts
|
|
21727
21738
|
async function retrieveRedditThread(kernelApiKey, input) {
|
|
21728
|
-
|
|
21729
|
-
|
|
21730
|
-
|
|
21731
|
-
|
|
21732
|
-
|
|
21733
|
-
|
|
21734
|
-
|
|
21739
|
+
const kernelFailures = [];
|
|
21740
|
+
let kernelAttempts = 0;
|
|
21741
|
+
if (!kernelApiKey) {
|
|
21742
|
+
kernelFailures.push("Kernel Reddit primary is not configured");
|
|
21743
|
+
} else {
|
|
21744
|
+
for (let attempt = 1; attempt <= 2; attempt += 1) {
|
|
21745
|
+
kernelAttempts = attempt;
|
|
21746
|
+
try {
|
|
21747
|
+
const primary = await runKernelRedditThread(kernelApiKey, input);
|
|
21748
|
+
if (!isAcceptedRedditThread(primary.thread, input.maxComments)) {
|
|
21749
|
+
throw new Error(`Kernel Reddit primary returned ${primary.thread.comments.length} comments below the ${redditThreadAcceptanceTarget(primary.thread, input.maxComments)} comment acceptance target`);
|
|
21750
|
+
}
|
|
21751
|
+
return {
|
|
21752
|
+
...primary,
|
|
21753
|
+
diagnostics: {
|
|
21754
|
+
...primary.diagnostics,
|
|
21755
|
+
fallbackUsed: false,
|
|
21756
|
+
retrievalProvider: "kernel",
|
|
21757
|
+
kernelAttempts,
|
|
21758
|
+
brightDataAttempts: 0,
|
|
21759
|
+
totalAttempts: kernelAttempts,
|
|
21760
|
+
kernelFailures
|
|
21761
|
+
}
|
|
21762
|
+
};
|
|
21763
|
+
} catch (error) {
|
|
21764
|
+
const message = sanitizeProviderLocalMessage(error instanceof Error ? error.message : String(error)) ?? "Kernel Reddit primary failed";
|
|
21765
|
+
kernelFailures.push(message);
|
|
21766
|
+
console.warn(JSON.stringify({
|
|
21767
|
+
event: "reddit_kernel_primary_rejected",
|
|
21768
|
+
attempt,
|
|
21769
|
+
max_attempts: 2,
|
|
21770
|
+
will_retry: attempt < 2,
|
|
21771
|
+
error: message,
|
|
21772
|
+
fallback: attempt === 2 ? "bright_data_browser_api" : null
|
|
21773
|
+
}));
|
|
21735
21774
|
}
|
|
21775
|
+
}
|
|
21776
|
+
}
|
|
21777
|
+
const brightDataFailures = [];
|
|
21778
|
+
for (let attempt = 1; attempt <= 2; attempt += 1) {
|
|
21779
|
+
try {
|
|
21780
|
+
const backup = await runBrightDataRedditThreadBackup(input.url, Math.min(input.maxComments, 25));
|
|
21736
21781
|
return {
|
|
21737
|
-
...
|
|
21738
|
-
diagnostics: {
|
|
21782
|
+
...backup,
|
|
21783
|
+
diagnostics: {
|
|
21784
|
+
...backup.diagnostics,
|
|
21785
|
+
retrievalProvider: "bright_data_browser_api",
|
|
21786
|
+
primaryProvider: "kernel",
|
|
21787
|
+
primaryFailure: kernelFailures.at(-1) ?? "Kernel Reddit primary failed",
|
|
21788
|
+
kernelAttempts,
|
|
21789
|
+
brightDataAttempts: attempt,
|
|
21790
|
+
totalAttempts: kernelAttempts + attempt,
|
|
21791
|
+
kernelFailures,
|
|
21792
|
+
brightDataFailures
|
|
21793
|
+
}
|
|
21739
21794
|
};
|
|
21740
21795
|
} catch (error) {
|
|
21741
|
-
|
|
21796
|
+
const message = sanitizeProviderLocalMessage(error instanceof Error ? error.message : String(error)) ?? "Bright Data Reddit backup failed";
|
|
21797
|
+
brightDataFailures.push(message);
|
|
21798
|
+
console.warn(JSON.stringify({
|
|
21799
|
+
event: "reddit_bright_data_backup_rejected",
|
|
21800
|
+
attempt,
|
|
21801
|
+
max_attempts: 2,
|
|
21802
|
+
will_retry: attempt < 2,
|
|
21803
|
+
error: message
|
|
21804
|
+
}));
|
|
21742
21805
|
}
|
|
21743
21806
|
}
|
|
21744
|
-
|
|
21745
|
-
|
|
21746
|
-
|
|
21747
|
-
const backup = await runBrightDataRedditThreadBackup(input.url, Math.min(input.maxComments, 25));
|
|
21748
|
-
return {
|
|
21749
|
-
...backup,
|
|
21750
|
-
diagnostics: {
|
|
21751
|
-
...backup.diagnostics,
|
|
21752
|
-
retrievalProvider: "bright_data_browser_api",
|
|
21753
|
-
primaryProvider: "kernel",
|
|
21754
|
-
primaryFailure: primaryError
|
|
21755
|
-
}
|
|
21756
|
-
};
|
|
21757
|
-
} catch (backupError) {
|
|
21758
|
-
const backupMessage = sanitizeProviderLocalMessage(backupError instanceof Error ? backupError.message : String(backupError)) ?? "Bright Data Reddit backup failed";
|
|
21759
|
-
throw new Error(`Reddit retrieval failed: Kernel primary: ${primaryError}; Bright Data backup: ${backupMessage}`);
|
|
21760
|
-
}
|
|
21807
|
+
throw new Error(
|
|
21808
|
+
`Reddit retrieval failed: Kernel attempts: ${kernelFailures.join(" | ")}; Bright Data attempts: ${brightDataFailures.join(" | ")}`
|
|
21809
|
+
);
|
|
21761
21810
|
}
|
|
21762
21811
|
|
|
21763
21812
|
// src/api/reddit-routes.ts
|
|
@@ -21827,7 +21876,7 @@ redditApp.post("/thread", createApiKeyAuth(), async (c) => {
|
|
|
21827
21876
|
canonicalUrl: receipt4.canonicalUrl,
|
|
21828
21877
|
oldRedditUrl: null,
|
|
21829
21878
|
retrievalSource: "www_reddit",
|
|
21830
|
-
attempts: receipt4.diagnostics.fallbackUsed ? 2 : 1,
|
|
21879
|
+
attempts: receipt4.diagnostics.totalAttempts ?? (receipt4.diagnostics.fallbackUsed ? 2 : 1),
|
|
21831
21880
|
diagnostics: receipt4.diagnostics
|
|
21832
21881
|
};
|
|
21833
21882
|
const commentCount = Array.isArray(result3.comments) ? result3.comments.length : 0;
|
|
@@ -57747,11 +57796,17 @@ function parsedObject(c) {
|
|
|
57747
57796
|
const parsed = ObjectSchema.safeParse(c.req.param("object"));
|
|
57748
57797
|
return parsed.success ? parsed.data : null;
|
|
57749
57798
|
}
|
|
57799
|
+
function stripRelationshipDeploymentQuery(query) {
|
|
57800
|
+
const publicQuery = { ...query };
|
|
57801
|
+
delete publicQuery.researchSubpath;
|
|
57802
|
+
delete publicQuery.crmSubpath;
|
|
57803
|
+
return publicQuery;
|
|
57804
|
+
}
|
|
57750
57805
|
var researchApp = new Hono37();
|
|
57751
57806
|
researchApp.use("*", createApiKeyAuth());
|
|
57752
57807
|
for (const object2 of ["people", "organizations"]) {
|
|
57753
57808
|
researchApp.get(`/${object2}`, async (c) => {
|
|
57754
|
-
const query = QuerySchema.safeParse(c.req.query());
|
|
57809
|
+
const query = QuerySchema.safeParse(stripRelationshipDeploymentQuery(c.req.query()));
|
|
57755
57810
|
if (!query.success) return c.json(safeFailure2("The Research filters are invalid.", "invalid_request"), 400);
|
|
57756
57811
|
return call(c, researchTools[object2].search, query.data);
|
|
57757
57812
|
});
|
|
@@ -57827,7 +57882,7 @@ crmApp.get("/summary", async (c) => {
|
|
|
57827
57882
|
});
|
|
57828
57883
|
for (const object2 of ["people", "organizations"]) {
|
|
57829
57884
|
crmApp.get(`/${object2}`, async (c) => {
|
|
57830
|
-
const query = QuerySchema.safeParse(c.req.query());
|
|
57885
|
+
const query = QuerySchema.safeParse(stripRelationshipDeploymentQuery(c.req.query()));
|
|
57831
57886
|
if (!query.success) return c.json(safeFailure2("The CRM filters are invalid.", "invalid_request"), 400);
|
|
57832
57887
|
return call(c, crmTools[object2].search, query.data);
|
|
57833
57888
|
});
|