Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

feat(monitor): wire real blocklist into search runner

Developers Digestfa591bf0834a
diff --git a/apps/api/src/services/monitoring/runner.ts b/apps/api/src/services/monitoring/runner.ts
index a309d2e18..d52f50e55 100644
--- a/apps/api/src/services/monitoring/runner.ts
+++ b/apps/api/src/services/monitoring/runner.ts
@@ -68,6 +68,8 @@ import { trackMonitorCheckStartedInterest } from "./interest";
import { runSearchTarget, type ScrapeSearchResult } from "./search/run";
import { verdictJsonSchema } from "./search/judge";
import { computeGoalVersion } from "./search/dedupe";
+import { isUrlBlocked } from "../../scraper/WebScraper/utils/blocklist";
+import { getACUCTeam } from "../../controllers/auth";
import {
reconstructKnownState,
searchStatusToPageStatus,
@@ -715,6 +717,10 @@ async function runMonitorSearchTarget(params: {
goalVersion,
);
+ // Same blocklist gate prod scrapes use, applied per team (honors unblockedDomains).
+ const acuc = await getACUCTeam(monitor.team_id);
+ const teamFlags = acuc?.flags ?? null;
+
const result = await runSearchTarget({
monitor: {
id: monitor.id,
@@ -744,6 +750,11 @@ async function runMonitorSearchTarget(params: {
url,
judgePrompt,
}),
+ isBlocked: url =>
+ isUrlBlocked(url, teamFlags, {
+ team_id: monitor.team_id,
+ origin: "monitor.search",
+ }),
goalVersion,
knownPages,
knownEvents,