:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(signals): add fleet findings summary endpoint for scout callout (#67044)
Andrew Maguire0a430e221901
diff --git a/frontend/src/scenes/inbox/components/config/scouts/FleetFindingsCallout.tsx b/frontend/src/scenes/inbox/components/config/scouts/FleetFindingsCallout.tsxindex 4f854affb2bd..561b177160ce 100644--- a/frontend/src/scenes/inbox/components/config/scouts/FleetFindingsCallout.tsx+++ b/frontend/src/scenes/inbox/components/config/scouts/FleetFindingsCallout.tsx@@ -10,14 +10,14 @@ import { scoutFleetLogic } from '../../../logics/scoutFleetLogic'/*** Findings stat card for the scout troop list, above the scratchpad callout. Advertises the troop's* recent findings (count · scouts · recency) and links into the cross-fleet findings page. Reads the- * cheap `emittedFindingsSummary` so it never triggers the per-run fetch the page does on open. Renders- * nothing until there's at least one finding.+ * cheap `emittedFindingsSummary` (a single backend query) so it appears as soon as that lands rather+ * than after the full paginated runs-window walk. Renders nothing until there's at least one finding.*/export function FleetFindingsCallout({ onOpen }: { onOpen: () => void }): JSX.Element | null {- const { emittedFindingsSummary, runsWindowLoadedOnce } = useValues(scoutFleetLogic)+ const { emittedFindingsSummary, fleetFindingsSummaryLoadedOnce } = useValues(scoutFleetLogic)- // Hold until the first runs-window load settles, then only show when there's something to read.- if (!runsWindowLoadedOnce || emittedFindingsSummary.count === 0) {+ // Hold until the cheap summary lands, then only show when there's something to read.+ if (!fleetFindingsSummaryLoadedOnce || emittedFindingsSummary.count === 0) {return null}diff --git a/frontend/src/scenes/inbox/logics/scoutFleetLogic.ts b/frontend/src/scenes/inbox/logics/scoutFleetLogic.tsindex d067f720926f..1fb228baf0db 100644--- a/frontend/src/scenes/inbox/logics/scoutFleetLogic.ts+++ b/frontend/src/scenes/inbox/logics/scoutFleetLogic.ts@@ -10,8 +10,8 @@ import { teamLogic } from 'scenes/teamLogic'import { urls } from 'scenes/urls'import { OriginProduct } from 'products/posthog_ai/frontend/types/taskTypes'-import { signalsScoutMetadataGet } from 'products/signals/frontend/generated/api'-import type { ScoutMetadataApi } from 'products/signals/frontend/generated/api.schemas'+import { signalsScoutMetadataGet, signalsScoutRunsFindingsSummary } from 'products/signals/frontend/generated/api'+import type { FleetFindingsSummaryApi, ScoutMetadataApi } from 'products/signals/frontend/generated/api.schemas'import { SignalScoutConfig, SignalScoutConfigUpdate, SignalScoutRunSummary } from '../types'import {@@ -19,7 +19,6 @@ import {computeScoutRollups,FleetSummary,getScoutOrigin,- mostRecentEmittedRuns,SCOUT_RUNS_WINDOW_HOURS,ScoutRollup,sortConfigsForDisplay,@@ -92,6 +91,21 @@ export const scoutFleetLogic = kea<scoutFleetLogicType>([},},],+ // Cheap fleet-wide findings tally for the "Scout findings" callout — one backend query over+ // emitted runs, so the callout no longer waits on the full paginated runs-window walk (which+ // could take ~10s and was the reason the callout appeared long after the modal opened).+ fleetFindingsSummary: [+ null as FleetFindingsSummaryApi | null,+ {+ loadFleetFindingsSummary: async () => {+ const teamId = teamLogic.values.currentTeamId+ if (!teamId) {+ return null+ }+ return await signalsScoutRunsFindingsSummary(String(teamId))+ },+ },+ ],runsWindow: [{ runs: [] as SignalScoutRunSummary[], complete: true } as {runs: SignalScoutRunSummary[]@@ -186,6 +200,15 @@ export const scoutFleetLogic = kea<scoutFleetLogicType>([loadRunsWindowSuccess: () => true,},],+ // Flips true once the cheap findings summary lands, so the callout can tell "not loaded yet"+ // from "loaded, genuinely zero" without the full runs window. Like `runsWindowLoadedOnce`,+ // deliberately NOT set on failure: a failed load keeps the callout hidden, not falsely empty.+ fleetFindingsSummaryLoadedOnce: [+ false,+ {+ loadFleetFindingsSummarySuccess: () => true,+ },+ ],}),selectors({@@ -227,25 +250,19 @@ export const scoutFleetLogic = kea<scoutFleetLogicType>([},],runsWindowComplete: [(s) => [s.runsWindow], (runsWindow): boolean => runsWindow.complete],- // Cheap fleet-wide findings tally off the runs window — sums each run's `emitted_count` without- // fetching emission bodies, to power the "Scout findings" callout. Tallied over the SAME capped- // set the page fetches (`mostRecentEmittedRuns`) so the callout can't over-advertise.+ // Fleet-wide findings tally for the "Scout findings" callout, read from the cheap backend+ // summary rather than the paginated runs window. The backend counts the same capped set the+ // findings page renders (most recent 120 emitted runs in the window), so the callout can't+ // over-advertise. Zeroed until the summary loads.emittedFindingsSummary: [- (s) => [s.runsWindow],- (runsWindow): { count: number; scoutCount: number; latestAt: string | null } => {- let count = 0- const scouts = new Set<string>()- let latestAt: string | null = null- for (const run of mostRecentEmittedRuns(runsWindow.runs)) {- count += run.emitted_count ?? 0- scouts.add(run.skill_name)- const at = run.completed_at ?? run.created_at- if (at && (!latestAt || at > latestAt)) {- latestAt = at- }- }- return { count, scoutCount: scouts.size, latestAt }- },+ (s) => [s.fleetFindingsSummary],+ (+ fleetFindingsSummary: FleetFindingsSummaryApi | null+ ): { count: number; scoutCount: number; latestAt: string | null } => ({+ count: fleetFindingsSummary?.count ?? 0,+ scoutCount: fleetFindingsSummary?.scout_count ?? 0,+ latestAt: fleetFindingsSummary?.latest_at ?? null,+ }),],customScoutCount: [(s) => [s.scoutConfigs],@@ -297,10 +314,16 @@ export const scoutFleetLogic = kea<scoutFleetLogicType>([startRunsPolling: () => {// Fetch once immediately, then a slow poll keeps "running now" + recent emissions// fresh. The keyed disposable replaces any prior poll and is torn down on- // stopRunsPolling / unmount / tab hide.+ // stopRunsPolling / unmount / tab hide. The cheap findings summary rides the same+ // cadence so the "Scout findings" callout fills in on its own fast query rather than+ // waiting on the paginated runs-window walk.actions.loadRunsWindow()+ actions.loadFleetFindingsSummary()cache.disposables.add(() => {- const interval = setInterval(() => actions.loadRunsWindow(), RUNS_REFETCH_INTERVAL_MS)+ const interval = setInterval(() => {+ actions.loadRunsWindow()+ actions.loadFleetFindingsSummary()+ }, RUNS_REFETCH_INTERVAL_MS)return () => clearInterval(interval)}, 'runsPoll')},diff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.pyindex ac19b08ca8ff..91123ca31670 100644--- a/products/signals/backend/scout_harness/serializers.py+++ b/products/signals/backend/scout_harness/serializers.py@@ -23,6 +23,7 @@ from products.signals.backend.scout_harness.tools.emit import (MAX_TAGS_PER_FINDING,)from products.signals.backend.scout_harness.tools.report import MAX_REPORT_TITLE_LENGTH, MAX_SUGGESTED_REVIEWERS+from products.signals.backend.scout_harness.tools.runs import DEFAULT_FINDINGS_WINDOW_HOURS, MAX_FINDINGS_WINDOW_HOURSfrom products.signals.backend.scout_harness.tools.scratchpad import MAX_SCRATCHPAD_CONTENT_LENGTH# --- Run history -----------------------------------------------------------@@ -278,6 +279,42 @@ class RecentEmissionsQuerySerializer(serializers.Serializer):)+class FleetFindingsSummarySerializer(serializers.Serializer):+ """Fleet-wide tally of recently emitted findings — backs the "Scout findings" callout so it+ renders from one cheap query instead of the client walking the whole paginated runs window."""++ count = serializers.IntegerField(+ help_text=(+ "Total findings the fleet emitted in the window — the sum of each emitted run's "+ "`emitted_count`, over the most recent 120 emitted runs."+ )+ )+ scout_count = serializers.IntegerField(+ help_text="Number of distinct scouts (skills) that emitted at least one finding in the window."+ )+ latest_at = serializers.DateTimeField(+ allow_null=True,+ help_text=(+ "ISO-8601 timestamp of the most recently emitted finding's run (TaskRun completion, "+ "falling back to run creation), or null when nothing was emitted in the window."+ ),+ )+++class FleetFindingsSummaryQuerySerializer(serializers.Serializer):+ """Query parameters for the `findings/summary` action."""++ window_hours = serializers.IntegerField(+ required=False,+ min_value=1,+ max_value=MAX_FINDINGS_WINDOW_HOURS,+ help_text=(+ f"Lookback window in hours over runs' `created_at` "+ f"(default {DEFAULT_FINDINGS_WINDOW_HOURS}, hard cap {MAX_FINDINGS_WINDOW_HOURS})."+ ),+ )++class SearchRecentRunsQuerySerializer(serializers.Serializer):"""Query parameters for `search-recent-runs`."""diff --git a/products/signals/backend/scout_harness/tools/runs.py b/products/signals/backend/scout_harness/tools/runs.pyindex 5bd5850ab0da..678a88867254 100644--- a/products/signals/backend/scout_harness/tools/runs.py+++ b/products/signals/backend/scout_harness/tools/runs.py@@ -17,10 +17,12 @@ findings (and so left no `Signal` row to query against) — plus thefrom __future__ import annotationsfrom dataclasses import asdict, dataclass, field-from datetime import datetime+from datetime import datetime, timedeltafrom typing import TYPE_CHECKING, Anyfrom django.db.models import Q+from django.db.models.functions import Coalesce+from django.utils import timezonefrom products.signals.backend.models import SignalScoutRunfrom products.tasks.backend.facade import api as tasks_facade@@ -32,6 +34,14 @@ if TYPE_CHECKING:DEFAULT_RUN_SEARCH_LIMIT = 20MAX_RUN_SEARCH_LIMIT = 100+# The "Scout findings" callout summary tallies findings over a fixed lookback window. The default+# window and the run cap mirror the cloud/desktop frontend (`SCOUT_RUNS_WINDOW_HOURS = 72` /+# `MAX_FLEET_EMITTED_RUNS = 120`) so the callout count matches the set the findings page renders;+# the max window bounds a pathological lookback.+DEFAULT_FINDINGS_WINDOW_HOURS = 72+MAX_FINDINGS_WINDOW_HOURS = 168+FLEET_FINDINGS_SUMMARY_RUN_CAP = 120+# `failure_reason` is the concise, list-safe derived signal; `error` carries the full# `TaskRun.error_message`. Bound the derived reason so it stays cheap to scan in bulk.MAX_FAILURE_REASON_LENGTH = 500@@ -164,6 +174,53 @@ def search_recent_runs(return [_to_summary(row, team_id=team_id) for row in qs]+@dataclass(frozen=True)+class FleetFindingsSummary:+ """Cheap fleet-wide tally of recently emitted findings — what the "Scout findings" callout reads."""++ count: int+ scout_count: int+ latest_at: str | None++ def as_dict(self) -> dict[str, Any]:+ return asdict(self)+++def fleet_findings_summary(*, team_id: int, window_hours: int = DEFAULT_FINDINGS_WINDOW_HOURS) -> FleetFindingsSummary:+ """Summarise the findings the fleet emitted in the recent window, in a single query.++ Replaces the client-side tally that walked the whole paginated runs window just to count+ findings for the callout. Counts only emitted runs (`emitted_count > 0`) whose `created_at`+ falls in the last `window_hours`, capped to the most recent `FLEET_FINDINGS_SUMMARY_RUN_CAP`+ runs by completion time (falling back to creation) — the same set the findings page renders,+ so the callout can't over-advertise. Returns the finding total (sum of `emitted_count`), the+ distinct scout count, and the most recent emission time.+ """+ window_hours = max(1, min(window_hours, MAX_FINDINGS_WINDOW_HOURS))+ window_start = timezone.now() - timedelta(hours=window_hours)+ # Order by completion (fall back to creation) so the cap keeps the *most recently emitted* runs,+ # matching the frontend's `completed_at ?? created_at` sort; `-id` tie-breaks on the time-ordered PK.+ rows = (+ SignalScoutRun.objects.filter(team_id=team_id, created_at__gte=window_start, emitted_count__gt=0)+ .annotate(_emitted_at=Coalesce("task_run__completed_at", "created_at"))+ .order_by("-_emitted_at", "-id")+ .values_list("emitted_count", "skill_name", "_emitted_at")[:FLEET_FINDINGS_SUMMARY_RUN_CAP]+ )+ count = 0+ scouts: set[str] = set()+ latest_at: datetime | None = None+ for emitted_count, skill_name, emitted_at in rows:+ count += emitted_count or 0+ scouts.add(skill_name)+ if emitted_at is not None and (latest_at is None or emitted_at > latest_at):+ latest_at = emitted_at+ return FleetFindingsSummary(+ count=count,+ scout_count=len(scouts),+ latest_at=latest_at.isoformat() if latest_at is not None else None,+ )++def get_run(*, team_id: int, run_id: str) -> RunDetail | None:"""Fetch a single run by ID, scoped to the team. Returns None if not found.diff --git a/products/signals/backend/scout_harness/views.py b/products/signals/backend/scout_harness/views.pyindex 849f1e1aa509..c51255c8458f 100644--- a/products/signals/backend/scout_harness/views.py+++ b/products/signals/backend/scout_harness/views.py@@ -71,6 +71,8 @@ from products.signals.backend.scout_harness.serializers import (EmitReportRequestSerializer,EmitReportResponseSerializer,EvidenceEntrySerializer,+ FleetFindingsSummaryQuerySerializer,+ FleetFindingsSummarySerializer,ForgetRequestSerializer,ForgetResponseSerializer,ProjectProfileQuerySerializer,@@ -105,7 +107,12 @@ from products.signals.backend.scout_harness.tools.report import (edit_report_sync,emit_report_sync,)-from products.signals.backend.scout_harness.tools.runs import get_run, search_recent_runs+from products.signals.backend.scout_harness.tools.runs import (+ DEFAULT_FINDINGS_WINDOW_HOURS,+ fleet_findings_summary,+ get_run,+ search_recent_runs,+)from products.signals.backend.scout_harness.tools.scratchpad import (InvalidScratchpadError,forget,@@ -331,6 +338,38 @@ class SignalScoutRunViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):)return Response(SignalScoutRunSummarySerializer([row.as_dict() for row in rows], many=True).data)+ @validated_request(+ query_serializer=FleetFindingsSummaryQuerySerializer,+ responses={+ 200: OpenApiResponse(+ response=FleetFindingsSummarySerializer,+ description="Fleet-wide tally of recently emitted findings.",+ ),+ },+ summary="Summarise recently emitted findings across the fleet",+ description=(+ "Return a cheap fleet-wide tally of the findings the scout troop emitted in the recent window — "+ "the total count, the number of distinct scouts behind them, and the latest emission time. "+ "Backs the 'Scout findings' callout so it renders from one query instead of the client paging "+ "through the whole runs window. Counts only runs that emitted at least one finding "+ "(`emitted_count > 0`) within the last `window_hours` (default 72), capped to the most recent "+ "120 emitted runs so the count matches what the findings list renders. Strictly team-scoped."+ ),+ operation_id="signals_scout_runs_findings_summary",+ )+ @action(+ detail=False,+ methods=["get"],+ url_path="findings/summary",+ required_scopes=["signal_scout:read"],+ pagination_class=None,+ )+ def findings_summary(self, request: Request, **kwargs) -> Response:+ validated = getattr(request, "validated_query_data", {}) or {}+ window_hours = validated.get("window_hours") or DEFAULT_FINDINGS_WINDOW_HOURS+ summary = fleet_findings_summary(team_id=_canonical_team_id(self), window_hours=window_hours)+ return Response(FleetFindingsSummarySerializer(summary.as_dict()).data)+@extend_schema(parameters=[_RUN_ID_PATH_PARAMETER],responses={diff --git a/products/signals/backend/test/test_scout_harness_api.py b/products/signals/backend/test/test_scout_harness_api.pyindex 6a68b182374f..3cd2a952c1a1 100644--- a/products/signals/backend/test/test_scout_harness_api.py+++ b/products/signals/backend/test/test_scout_harness_api.py@@ -1,11 +1,13 @@from __future__ import annotations+from datetime import timedeltafrom typing import TYPE_CHECKINGfrom posthog.test.base import APIBaseTestfrom unittest.mock import AsyncMock, patchfrom django.apps import apps+from django.utils import timezonefrom parameterized import parameterizedfrom rest_framework import status@@ -527,6 +529,39 @@ class TestScoutHarnessRecentEmissionsAPI(APIBaseTest):assert [row["finding_id"] for row in response.json()] == ["older"]+class TestScoutHarnessFindingsSummaryAPI(APIBaseTest):+ def _url(self) -> str:+ return f"/api/projects/{self.team.id}/signals/scout/runs/findings/summary/"++ def test_summary_tallies_emitted_findings_across_scouts(self) -> None:+ # The cheap callout tally that replaced the client walking the whole paginated runs window:+ # sums each emitted run's emitted_count, counts distinct scouts, and ignores both quiet runs+ # and other teams. Drop any of those and the callout count drifts.+ _make_run(self.team, skill_name="signals-scout-errors", emitted_count=2, emitted_finding_ids=["a", "b"])+ _make_run(self.team, skill_name="signals-scout-llm", emitted_count=1, emitted_finding_ids=["c"])+ _make_run(self.team, skill_name="signals-scout-errors") # quiet — emitted_count defaults to 0+ other = Team.objects.create(organization=self.organization, name="Other")+ _make_run(other, emitted_count=5, emitted_finding_ids=["x", "y", "z", "w", "v"])+ response = self.client.get(self._url())+ assert response.status_code == status.HTTP_200_OK+ body = response.json()+ assert body["count"] == 3+ assert body["scout_count"] == 2+ assert body["latest_at"] is not None++ def test_summary_excludes_runs_outside_the_window(self) -> None:+ # Guards the `created_at` window filter: a finding emitted before the lookback must not count,+ # else the callout would advertise stale findings the findings page won't show.+ _make_run(self.team, emitted_count=1, emitted_finding_ids=["recent"])+ stale = _make_run(self.team, emitted_count=4, emitted_finding_ids=["a", "b", "c", "d"])+ SignalScoutRun.objects.filter(id=stale.id).update(created_at=timezone.now() - timedelta(hours=80))+ response = self.client.get(self._url())+ assert response.status_code == status.HTTP_200_OK+ body = response.json()+ assert body["count"] == 1+ assert body["scout_count"] == 1++class TestScoutHarnessEmitFindingAPI(APIBaseTest):def setUp(self) -> None:super().setUp()diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex a64cd627551e..d63285ba8918 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -1573,6 +1573,22 @@ export interface ScoutRunIdsBatchRequestApi {run_ids: string[]}+/**+ * Fleet-wide tally of recently emitted findings — backs the "Scout findings" callout so it+ * renders from one cheap query instead of the client walking the whole paginated runs window.+ */+export interface FleetFindingsSummaryApi {+ /** Total findings the fleet emitted in the window — the sum of each emitted run's `emitted_count`, over the most recent 120 emitted runs. */+ count: number+ /** Number of distinct scouts (skills) that emitted at least one finding in the window. */+ scout_count: number+ /**+ * ISO-8601 timestamp of the most recently emitted finding's run (TaskRun completion, falling back to run creation), or null when nothing was emitted in the window.+ * @nullable+ */+ latest_at: string | null+}+/*** `SignalScratchpad` projection used by `search-memory` and `remember`.*/@@ -1917,6 +1933,15 @@ export type SignalsScoutRunsRecentEmissionsParams = {skill_name?: string}+export type SignalsScoutRunsFindingsSummaryParams = {+ /**+ * Lookback window in hours over runs' `created_at` (default 72, hard cap 168).+ * @minimum 1+ * @maximum 168+ */+ window_hours?: number+}+export type SignalsScoutScratchpadSearchParams = {/*** Truncate each entry's `content` to the first N characters (a preview). Omit for the full body. Ignored when `keys_only=true`.diff --git a/products/signals/frontend/generated/api.ts b/products/signals/frontend/generated/api.tsindex 1ec8d62215e2..2080d9309eb3 100644--- a/products/signals/frontend/generated/api.ts+++ b/products/signals/frontend/generated/api.ts@@ -16,6 +16,7 @@ import type {EmitFindingResponseApi,EmitReportRequestApi,EmitReportResponseApi,+ FleetFindingsSummaryApi,ForgetRequestApi,ForgetResponseApi,PaginatedPauseStateResponseListApi,@@ -54,6 +55,7 @@ import type {SignalsReportsListParams,SignalsScoutMembersListParams,SignalsScoutProjectProfileGetParams,+ SignalsScoutRunsFindingsSummaryParams,SignalsScoutRunsListParams,SignalsScoutRunsRecentEmissionsParams,SignalsScoutScratchpadSearchParams,@@ -805,6 +807,40 @@ export const signalsScoutRunsEmissionReportsBatch = async (})}+export const getSignalsScoutRunsFindingsSummaryUrl = (+ projectId: string,+ params?: SignalsScoutRunsFindingsSummaryParams+) => {+ const normalizedParams = new URLSearchParams()++ Object.entries(params || {}).forEach(([key, value]) => {+ if (value !== undefined) {+ normalizedParams.append(key, value === null ? 'null' : String(value))+ }+ })++ const stringifiedParams = normalizedParams.toString()++ return stringifiedParams.length > 0+ ? `/api/projects/${projectId}/signals/scout/runs/findings/summary/?${stringifiedParams}`+ : `/api/projects/${projectId}/signals/scout/runs/findings/summary/`+}++/**+ * Return a cheap fleet-wide tally of the findings the scout troop emitted in the recent window — the total count, the number of distinct scouts behind them, and the latest emission time. Backs the 'Scout findings' callout so it renders from one query instead of the client paging through the whole runs window. Counts only runs that emitted at least one finding (`emitted_count > 0`) within the last `window_hours` (default 72), capped to the most recent 120 emitted runs so the count matches what the findings list renders. Strictly team-scoped.+ * @summary Summarise recently emitted findings across the fleet+ */+export const signalsScoutRunsFindingsSummary = async (+ projectId: string,+ params?: SignalsScoutRunsFindingsSummaryParams,+ options?: RequestInit+): Promise<FleetFindingsSummaryApi> => {+ return apiMutator<FleetFindingsSummaryApi>(getSignalsScoutRunsFindingsSummaryUrl(projectId, params), {+ ...options,+ method: 'GET',+ })+}+export const getSignalsScoutScratchpadSearchUrl = (projectId: string, params?: SignalsScoutScratchpadSearchParams) => {const normalizedParams = new URLSearchParams()diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yamlindex 13b142037dbf..c6ceda9c4033 100644--- a/products/signals/mcp/tools.yaml+++ b/products/signals/mcp/tools.yaml@@ -549,6 +549,9 @@ tools:deterministic `source_id` (`run:<run_id>:finding:<finding_id>`) that joins back to the underlying signal.Use this to see *what* a run actually surfaced, not just how many (`emitted_count`) or which ids(`emitted_finding_ids`). Strictly team-scoped — a run UUID belonging to another team returns 404.+ signals-scout-runs-findings-summary:+ operation: signals_scout_runs_findings_summary+ enabled: falsesignals-scout-runs-list:operation: signals_scout_runs_listenabled: truediff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex c29669f9411d..b11b4dcc8300 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -23775,6 +23775,22 @@ export namespace Schemas {refreshing: boolean;}+ /**+ * Fleet-wide tally of recently emitted findings — backs the "Scout findings" callout so it+ * renders from one cheap query instead of the client walking the whole paginated runs window.+ */+ export interface FleetFindingsSummary {+ /** Total findings the fleet emitted in the window — the sum of each emitted run's `emitted_count`, over the most recent 120 emitted runs. */+ count: number;+ /** Number of distinct scouts (skills) that emitted at least one finding in the window. */+ scout_count: number;+ /**+ * ISO-8601 timestamp of the most recently emitted finding's run (TaskRun completion, falling back to run creation), or null when nothing was emitted in the window.+ * @nullable+ */+ latest_at: string | null;+ }+export interface FolderInstructions {/** Unique identifier for this instructions version. */readonly id: string;@@ -65436,6 +65452,15 @@ export namespace Schemas {skill_name?: string;};+ export type SignalsScoutRunsFindingsSummaryParams = {+ /**+ * Lookback window in hours over runs' `created_at` (default 72, hard cap 168).+ * @minimum 1+ * @maximum 168+ */+ window_hours?: number;+ };+export type SignalsScoutScratchpadSearchParams = {/*** Truncate each entry's `content` to the first N characters (a preview). Omit for the full body. Ignored when `keys_only=true`.