: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): create scout configs without waiting for the coordinator tick (#62860)
Andrew Maguire2bfe649bf0bf
diff --git a/AGENTS.md b/AGENTS.mdindex e87e95c70b51..4ac105a8e8cb 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -106,7 +106,7 @@ See [.agents/security.md](.agents/security.md) for SQL, HogQL, and semgrep secur- MCP UI apps (interactive visualizations for tool results) are defined in `products/*/mcp/tools.yaml` under `ui_apps` and auto-generated — see [services/mcp/CONTRIBUTING.md](services/mcp/CONTRIBUTING.md) or use the `implementing-mcp-ui-apps` skill- When touching a viewset or serializer, ensure schema annotations are present (`@extend_schema` or `@validated_request` on viewset methods, `help_text` on serializer fields) — these flow into generated frontend types and MCP tool schemas- New features should live in `products/` — read [products/README.md](products/README.md) for layout and setup. When _creating a new_ product, follow [products/architecture.md](products/architecture.md) (DTOs, facades, isolation)-- **Every tenant-data model must have `team_id`** — either as a FK (`models.ForeignKey("posthog.Team", ...)`) or a plain `BigIntegerField` (for multi-DB products). This is the primary tenant isolation boundary. Models without `team_id` must be org-scoped, user-scoped, or instance-global — never silently unscoped. New models should inherit from `TeamScopedRootMixin` (main DB) or `ProductTeamModel` (separate DB) so they start fail-closed — see `posthog/models/scoping/README.md`. CI enforces this via `posthog/models/scoping/baseline_unmigrated.txt`: any new team-scoped model not on a fail-closed manager fails the IDOR coverage check. In serializers, access the team via `self.context["get_team"]()`+- **Every tenant-data model must have `team_id`** — either as a FK (`models.ForeignKey("posthog.Team", ...)`) or a plain `BigIntegerField` (for multi-DB products). This is the primary tenant isolation boundary. Models without `team_id` must be org-scoped, user-scoped, or instance-global — never silently unscoped. New models should inherit from `TeamScopedRootMixin` (main DB) or `ProductTeamModel` (separate DB) so they start fail-closed — see `posthog/models/scoping/README.md`. CI enforces this via `posthog/models/scoping/baseline_unmigrated.txt`: any new team-scoped model not on a fail-closed manager fails the IDOR coverage check. In serializers, access the team via `self.context["get_team"]()`. When querying a fail-closed model for one team outside request context (Temporal activities, Celery tasks, management commands), use `Model.objects.for_team(team_id)` — not `Model.all_teams.filter(team_id=...)` or `objects.unscoped().filter(...)`; reserve `all_teams`/`unscoped()` for genuinely cross-team access and Django framework internals. Caveat: `for_team(...).get_or_create(...)`/`.create(...)` still need `team_id` passed explicitly — queryset filters don't propagate into row creation- **Do not add domain-specific fields to the `Team` model.** Use a Team Extension model instead — see `posthog/models/team/README.md` for the pattern and helpers- **PostHog event capture in Celery tasks:** Do not use `posthoganalytics.capture()` in Celery tasks — events are silently lost. Use `ph_scoped_capture` from `posthog.ph_client` instead (see its docstring for why and usage).- **Django admin `ForeignKey` fields need explicit widget config.** When adding a `ForeignKey`/`OneToOneField` to a model that's exposed in Django admin (including via inlines attached to a _related_ admin), list the new field in `autocomplete_fields`, `raw_id_fields`, or `readonly_fields` on **every** admin class that renders the model — otherwise the default `<select>` widget loads the entire target table per row on each change-page render. Prefer declaring the config on a shared base inline so per-parent variants (e.g., subclasses differentiated by `fk_name`) inherit it automatically.diff --git a/products/signals/ARCHITECTURE.md b/products/signals/ARCHITECTURE.mdindex 0840f3595b0e..d5a80e448cf9 100644--- a/products/signals/ARCHITECTURE.md+++ b/products/signals/ARCHITECTURE.md@@ -293,7 +293,7 @@ Defined in `backend/temporal/agentic/scout_coordinator.py`.**Flow:**-1. Activity `fetch_enabled_signals_scout_runs_activity` bounds candidates to the teams enrolled via the `signals-scout` feature flag's JSON payload allowlist — `guaranteed_team_ids` minus `skip_team_ids`, with a hardcoded fail-safe default (`_participating_teams` → `_enrolled_team_ids`, modeled on `posthog/temporal/ai_observability/team_discovery.py`). Enrollment is flag-driven: editing the payload in the flag UI enrolls or drains a team next tick with no manual seed. For each enrolled team it calls `sync_canonical_skills(team, prune=True)` to mirror the on-disk `signals-scout-*` skills onto the team's `LLMSkill` rows, then auto-registers a `SignalScoutConfig` for any scout skill missing one (`_register_missing_configs`). Failures here are logged and the tick continues — a stale skill is preferable to a dead tick.+1. Activity `fetch_enabled_signals_scout_runs_activity` bounds candidates to the teams enrolled via the `signals-scout` feature flag's JSON payload allowlist — `guaranteed_team_ids` minus `skip_team_ids`, with a hardcoded fail-safe default (`_participating_teams` → `_enrolled_team_ids`, modeled on `posthog/temporal/ai_observability/team_discovery.py`). Enrollment is flag-driven: editing the payload in the flag UI enrolls or drains a team next tick with no manual seed. For each enrolled team it calls `sync_canonical_skills(team, prune=True)` to mirror the on-disk `signals-scout-*` skills onto the team's `LLMSkill` rows, then auto-registers a `SignalScoutConfig` for any scout skill missing one (`scout_harness/config_registry.register_missing_configs`; the `signals-scout-config-create` endpoint is the explicit upsert counterpart, so a freshly authored scout is configurable without waiting for a tick). Failures here are logged and the tick continues — a stale skill is preferable to a dead tick.2. For each enabled config, the coordinator computes how overdue the scout is: due when `last_run_at is None`, or `now - last_run_at >= run_interval_minutes`. There is no sampling — every due scout is planned.3. Due runs are sorted most-overdue-first and truncated at `MAX_RUNS_PER_TICK` (50 per tick; the cost bound — overflow catches up next tick). `last_run_at` is advanced via `.update()` for everything dispatched (bypasses `save()`, so the per-tick write never hits the activity log). Planned runs are re-sorted by `(team_id, skill_name)` for stable child IDs.4. Each `PlannedRun` becomes a child `RunSignalsScoutWorkflow` started with `ParentClosePolicy.ABANDON` and a deterministic workflow ID per `(team_id, skill_name, tick_id)` so retried coordinators can't double-launch within a tick.diff --git a/products/signals/backend/scout_harness/AGENTS.md b/products/signals/backend/scout_harness/AGENTS.mdindex e6781864c478..f4704ae2ded5 100644--- a/products/signals/backend/scout_harness/AGENTS.md+++ b/products/signals/backend/scout_harness/AGENTS.md@@ -37,6 +37,11 @@ it is exercised via the `run_signals_scout` management command (see `../manageme`metadata.seeded_by="signals_scout_harness"` are ever updated. Called both lazily(coordinator tick, runner cold-start) and explicitly via the `sync_signals_scout_skills`management command.+- `config_registry.py`+ `register_missing_configs(team_id)` — auto-creates an enabled, default-schedule+ `SignalScoutConfig` for any `signals-scout-*` skill lacking one ("author a skill, get a+ scout"). Called by the coordinator tick; the HTTP surface registers explicitly via the+ write-scoped config `create` endpoint instead (reads stay side-effect free).- `tools/`Implementations of the four harness-internal tools the agent calls during a run.The effective toolset for a run is the intersection of the skill's `allowed_tools`@@ -73,9 +78,14 @@ ACTIVITY_SLACK_S`, the activity-level ceiling that gates the workflow'sDRF serializers for the harness HTTP surface (runs, scratchpad, project profile).Annotated for drf-spectacular so the generated MCP tools have informative schemas.- `views.py`- `SignalScoutRunViewSet`, `SignalScratchpadViewSet`, `SignalProjectProfileViewSet`.+ `SignalScoutRunViewSet`, `SignalScoutConfigViewSet`, `SignalScratchpadViewSet`,+ `SignalProjectProfileViewSet`.Routed under `environment_signals_scout_*` basenames in `posthog/api/__init__.py`and exposed as `signals-scout-*` MCP tools via `products/signals/mcp/tools.yaml`.+ The config viewset is the no-wait creation path: `create` registers (upserts) a+ config for an already-authored skill with its schedule/emit posture in one call.+ `list` is strictly read-only (its MCP tool is annotated `readOnly`) — it never+ mints config rows.## Mental modeldiff --git a/products/signals/backend/scout_harness/config_registry.py b/products/signals/backend/scout_harness/config_registry.pynew file mode 100644index 000000000000..7d7fde3b3e24--- /dev/null+++ b/products/signals/backend/scout_harness/config_registry.py@@ -0,0 +1,39 @@+"""Auto-registration of `SignalScoutConfig` rows for `signals-scout-*` skills.++The "author a skill, get a scout" contract: any `signals-scout-*` `LLMSkill` on a team+gets a `SignalScoutConfig` row (default schedule, enabled) with no further wiring. The+Temporal coordinator tick calls this so enrolled teams reconcile on schedule. The HTTP+surface deliberately does not: reads stay side-effect free, and explicit registration+goes through the write-scoped config `create` endpoint.+"""++from __future__ import annotations++from products.ai_observability.backend.models.skills import LLMSkill+from products.signals.backend.models import SignalScoutConfig+from products.signals.backend.scout_harness.skill_loader import SIGNALS_SCOUT_SKILL_PREFIX+++def register_missing_configs(team_id: int) -> set[str]:+ """Auto-create an enabled, default-schedule config for each scout skill lacking a row.++ Idempotent — `get_or_create` keyed on the `(team, skill_name)` unique constraint, so+ concurrent callers (coordinator tick racing an API call) converge on one row. Returns+ the set of live `signals-scout-*` skill names for the team, so the caller can skip+ dispatching configs whose skill is gone.+ """+ skill_names = set(+ LLMSkill.objects.filter(+ team_id=team_id,+ name__startswith=SIGNALS_SCOUT_SKILL_PREFIX,+ is_latest=True,+ deleted=False,+ ).values_list("name", flat=True)+ )+ configs = SignalScoutConfig.objects.for_team(team_id)+ existing = set(configs.values_list("skill_name", flat=True))+ for name in sorted(skill_names - existing):+ # `team_id` must be passed as a kwarg: `get_or_create` builds the created row from+ # kwargs/defaults only — the queryset's team filter does not propagate into `create`.+ configs.get_or_create(team_id=team_id, skill_name=name)+ return skill_namesdiff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.pyindex 5a53523d1713..96ebc9558a28 100644--- a/products/signals/backend/scout_harness/serializers.py+++ b/products/signals/backend/scout_harness/serializers.py@@ -15,6 +15,7 @@ from rest_framework import serializersfrom posthog.schema import Severityfrom products.signals.backend.models import SignalScoutConfig, SignalScoutEmission+from products.signals.backend.scout_harness.skill_loader import SIGNALS_SCOUT_SKILL_PREFIXfrom products.signals.backend.scout_harness.tools.emit import (MAX_FINDING_ID_LENGTH,MAX_TAG_LENGTH,@@ -1015,3 +1016,43 @@ class SignalScoutConfigSerializer(serializers.ModelSerializer):"created_at",]read_only_fields = ["id", "created_at"]+++class SignalScoutConfigCreateSerializer(serializers.Serializer):+ """Request body for registering a scout config without waiting for the coordinator tick.++ Upsert keyed on `skill_name`: if the coordinator (or a concurrent caller) already+ registered the row, the provided tunables are applied to it instead.+ """++ skill_name = serializers.CharField(+ max_length=200,+ help_text=(+ "The `signals-scout-*` skill to register a config for. The skill must already "+ "exist on this project — author it via the skills store first."+ ),+ )+ enabled = serializers.BooleanField(+ required=False,+ help_text="Whether this scout runs on its schedule. Defaults to true.",+ )+ emit = serializers.BooleanField(+ required=False,+ help_text=(+ "Whether the scout writes findings to the inbox. False = dry-run: it runs and logs "+ "but emits nothing. Defaults to true."+ ),+ )+ run_interval_minutes = serializers.IntegerField(+ required=False,+ min_value=10,+ max_value=43200,+ help_text="Minutes between runs (10–43200). Defaults to 60 (hourly).",+ )++ def validate_skill_name(self, value: str) -> str:+ # A config for a non-scout skill would never dispatch (the coordinator only considers+ # `signals-scout-*` names), so reject it here instead of minting an invisible orphan.+ if not value.startswith(SIGNALS_SCOUT_SKILL_PREFIX):+ raise serializers.ValidationError(f"Scout skill names must start with '{SIGNALS_SCOUT_SKILL_PREFIX}'.")+ return valuediff --git a/products/signals/backend/scout_harness/views.py b/products/signals/backend/scout_harness/views.pyindex ad49558c9269..9feeb3234923 100644--- a/products/signals/backend/scout_harness/views.py+++ b/products/signals/backend/scout_harness/views.py@@ -54,6 +54,7 @@ from products.signals.backend.scout_harness.serializers import (ScratchpadEntrySerializer,SearchMemoryQuerySerializer,SearchRecentRunsQuerySerializer,+ SignalScoutConfigCreateSerializer,SignalScoutConfigSerializer,SignalScoutEmissionSerializer,SignalScoutRunDetailSerializer,@@ -587,11 +588,15 @@ def _skill_descriptions_for(team_id: int, skill_names: list[str]) -> dict[str, sclass SignalScoutConfigViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):- """Per-scout config: list and tune each scout's schedule, enablement, and emit posture.-- `list` is read (`signal_scout:read`); `partial_update` is a user-grantable write- (`signal_scout:write`) — config changes drive spend, so enablement is activity-logged- and `enabled_by` records who flipped it on.+ """Per-scout config: list, register, and tune each scout's schedule, enablement, and+ emit posture.++ `list` is read (`signal_scout:read`) and side-effect free — the MCP tool is annotated+ `readOnly`, so it must never write. `create` and `partial_update` are user-grantable+ writes (`signal_scout:write`) — config changes drive spend, so enablement is+ activity-logged and `enabled_by` records who flipped it on. `create` exists so a freshly+ authored `signals-scout-*` skill can be configured immediately instead of waiting for the+ coordinator tick to auto-register a row."""serializer_class = SignalScoutConfigSerializer@@ -612,7 +617,9 @@ class SignalScoutConfigViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):summary="List scout configs",description=("List the per-(team, skill) scout configs for this project — schedule "- "(`run_interval_minutes`), `enabled`, and `emit` posture per scout."+ "(`run_interval_minutes`), `enabled`, and `emit` posture per scout. A freshly "+ "authored scout skill appears here once its config is registered, either "+ "explicitly via create or by the coordinator's next tick."),operation_id="signals_scout_config_list",)@@ -623,6 +630,65 @@ class SignalScoutConfigViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):serializer = SignalScoutConfigSerializer(configs, many=True, context={"skill_descriptions": descriptions})return Response(serializer.data)+ @extend_schema(+ request=SignalScoutConfigCreateSerializer,+ responses={+ 201: OpenApiResponse(response=SignalScoutConfigSerializer, description="Created config."),+ 200: OpenApiResponse(+ response=SignalScoutConfigSerializer,+ description="A config already existed for this skill; the provided fields were applied to it.",+ ),+ 400: OpenApiResponse(+ description="No such skill on this project, or the name lacks the `signals-scout-` prefix."+ ),+ },+ summary="Create a scout config",+ description=(+ "Register the config for a `signals-scout-*` skill immediately, without waiting "+ "for the coordinator to auto-register it — optionally setting `run_interval_minutes`, "+ "`enabled`, and `emit` in the same call. The skill must already exist on this "+ "project. Upsert: if a config already exists for the skill, the provided fields "+ "are applied to it."+ ),+ operation_id="signals_scout_config_create",+ )+ def create(self, request: Request, *args, **kwargs) -> Response:+ team_id = _canonical_team_id(self)+ serializer = SignalScoutConfigCreateSerializer(data=request.data)+ serializer.is_valid(raise_exception=True)+ skill_name = serializer.validated_data["skill_name"]+ if not LLMSkill.objects.filter(team_id=team_id, name=skill_name, is_latest=True, deleted=False).exists():+ raise exceptions.ValidationError(+ {"skill_name": "No skill with this name exists on this project. Author the skill first."}+ )+ tunables = {key: value for key, value in serializer.validated_data.items() if key != "skill_name"}+ # `team_id` stays in the kwargs: `get_or_create` builds the created row from+ # kwargs/defaults only — the queryset's team filter does not propagate into `create`.+ config, created = SignalScoutConfig.objects.for_team(team_id).get_or_create(+ team_id=team_id,+ skill_name=skill_name,+ defaults={+ **tunables,+ "created_by": request.user,+ # Configs default enabled; record who switched the scout on (it drives spend).+ "enabled_by": request.user if tunables.get("enabled", True) else None,+ },+ )+ if not created and tunables:+ # The coordinator tick (or a concurrent caller) won the race — apply the provided+ # fields to the existing row so the call still lands the requested settings.+ update = SignalScoutConfigSerializer(config, data=tunables, partial=True)+ update.is_valid(raise_exception=True)+ save_kwargs = {}+ if not config.enabled and update.validated_data.get("enabled"):+ save_kwargs["enabled_by"] = request.user+ config = update.save(**save_kwargs)+ descriptions = _skill_descriptions_for(team_id, [config.skill_name])+ return Response(+ SignalScoutConfigSerializer(config, context={"skill_descriptions": descriptions}).data,+ status=status.HTTP_201_CREATED if created else status.HTTP_200_OK,+ )+@extend_schema(request=SignalScoutConfigSerializer,responses={diff --git a/products/signals/backend/temporal/agentic/scout_coordinator.py b/products/signals/backend/temporal/agentic/scout_coordinator.pyindex 607249e0d7c5..aa59cce38163 100644--- a/products/signals/backend/temporal/agentic/scout_coordinator.py+++ b/products/signals/backend/temporal/agentic/scout_coordinator.py@@ -21,10 +21,9 @@ from posthog.models import Teamfrom posthog.sync import database_sync_to_asyncfrom posthog.temporal.common.heartbeat import Heartbeater-from products.ai_observability.backend.models.skills import LLMSkillfrom products.signals.backend.models import SignalScoutConfig+from products.signals.backend.scout_harness.config_registry import register_missing_configsfrom products.signals.backend.scout_harness.lazy_seed import sync_canonical_skills-from products.signals.backend.scout_harness.skill_loader import SIGNALS_SCOUT_SKILL_PREFIXfrom products.signals.backend.temporal.agentic.scout_scheduler import RunSignalsScoutInput, RunSignalsScoutWorkflowlogger = structlog.get_logger(__name__)@@ -172,7 +171,7 @@ def _collect_planned_runs(enrolled_team_ids: set[int]) -> list[PlannedRun]:"signals_scout coordinator: canonical skill sync failed for team; continuing",team_id=team.id,)- live_skills = _register_missing_configs(team)+ live_skills = register_missing_configs(team.id)# Skip enabled configs whose `signals-scout-*` skill was deleted or is no longer the# latest version: dispatching them would spawn a child workflow that fails fast in# load_skill_for_run on every tick.@@ -263,27 +262,6 @@ def _enrolled_team_ids() -> set[int]:return set(fallback)-def _register_missing_configs(team: Team) -> set[str]:- """Auto-create an enabled, default-schedule config for each scout skill lacking a row.-- The "author a skill, get a scout" path: a user-authored `signals-scout-foo` skill gets- a row on the next tick with no further wiring. Returns the set of live `signals-scout-*`- skill names for the team, so the caller can skip dispatching configs whose skill is gone.- """- skill_names = set(- LLMSkill.objects.filter(- team_id=team.id,- name__startswith=SIGNALS_SCOUT_SKILL_PREFIX,- is_latest=True,- deleted=False,- ).values_list("name", flat=True)- )- existing = set(SignalScoutConfig.all_teams.filter(team_id=team.id).values_list("skill_name", flat=True))- for name in sorted(skill_names - existing):- SignalScoutConfig.all_teams.get_or_create(team_id=team.id, skill_name=name)- return skill_names--def _overdue_seconds(config: SignalScoutConfig, now: datetime) -> float | None:"""Seconds past due (down to `-DUE_GRACE_SECONDS`), or None if not yet due. Never-run rows are maximally overdue."""if config.last_run_at is None:diff --git a/products/signals/backend/test/test_scout_harness_api.py b/products/signals/backend/test/test_scout_harness_api.pyindex bddcc3061f9b..4a2c2dd3ce35 100644--- a/products/signals/backend/test/test_scout_harness_api.py+++ b/products/signals/backend/test/test_scout_harness_api.py@@ -603,6 +603,14 @@ class TestScoutHarnessConfigAPI(APIBaseTest):def _detail_url(self, config_id: str) -> str:return f"/api/projects/{self.team.id}/signals/scout/configs/{config_id}/"+ def _make_skill(self, name: str, team: Team | None = None) -> LLMSkill:+ return LLMSkill.objects.create(+ team=team or self.team,+ name=name,+ description="test scout",+ body="# test scout",+ )+def test_list_returns_team_configs_ordered_by_skill(self) -> None:SignalScoutConfig.objects.create(team=self.team, skill_name="signals-scout-beta")SignalScoutConfig.objects.create(team=self.team, skill_name="signals-scout-alpha")@@ -707,3 +715,108 @@ class TestScoutHarnessConfigAPI(APIBaseTest):config = SignalScoutConfig.all_teams.create(team=other_team, skill_name="signals-scout-foo")response = self.client.patch(self._detail_url(str(config.id)), data={"enabled": False}, format="json")assert response.status_code == status.HTTP_404_NOT_FOUND++ def test_list_is_side_effect_free_for_unregistered_scout_skills(self) -> None:+ # The list MCP tool is annotated readOnly — a scout skill without a config must not+ # get one minted by a GET; registration is the coordinator's or `create`'s job.+ self._make_skill("signals-scout-fresh")++ response = self.client.get(self._list_url())++ assert response.status_code == status.HTTP_200_OK+ assert response.json() == []+ assert not SignalScoutConfig.objects.filter(team=self.team, skill_name="signals-scout-fresh").exists()++ def test_create_registers_config_with_provided_fields(self) -> None:+ self._make_skill("signals-scout-fresh")++ response = self.client.post(+ self._list_url(),+ data={"skill_name": "signals-scout-fresh", "run_interval_minutes": 120, "emit": False},+ format="json",+ )++ assert response.status_code == status.HTTP_201_CREATED+ body = response.json()+ assert body["skill_name"] == "signals-scout-fresh"+ assert body["run_interval_minutes"] == 120+ assert body["emit"] is False+ assert body["enabled"] is True+ config = SignalScoutConfig.objects.get(team=self.team, skill_name="signals-scout-fresh")+ assert config.created_by_id == self.user.id+ assert config.enabled_by_id == self.user.id++ def test_create_disabled_config_does_not_stamp_enabled_by(self) -> None:+ self._make_skill("signals-scout-fresh")++ response = self.client.post(+ self._list_url(), data={"skill_name": "signals-scout-fresh", "enabled": False}, format="json"+ )++ assert response.status_code == status.HTTP_201_CREATED+ config = SignalScoutConfig.objects.get(team=self.team, skill_name="signals-scout-fresh")+ assert config.enabled is False+ assert config.enabled_by_id is None++ def test_create_upserts_existing_config(self) -> None:+ self._make_skill("signals-scout-fresh")+ SignalScoutConfig.objects.create(team=self.team, skill_name="signals-scout-fresh", enabled=False)++ response = self.client.post(+ self._list_url(),+ data={"skill_name": "signals-scout-fresh", "enabled": True, "run_interval_minutes": 120},+ format="json",+ )++ assert response.status_code == status.HTTP_200_OK+ config = SignalScoutConfig.objects.get(team=self.team, skill_name="signals-scout-fresh")+ assert config.enabled is True+ assert config.run_interval_minutes == 120+ assert config.enabled_by_id == self.user.id++ def test_create_upsert_leaves_omitted_fields_untouched(self) -> None:+ self._make_skill("signals-scout-fresh")+ SignalScoutConfig.objects.create(+ team=self.team, skill_name="signals-scout-fresh", emit=False, run_interval_minutes=120+ )++ # Set only `emit` — the schedule must stay where it was.+ response = self.client.post(+ self._list_url(), data={"skill_name": "signals-scout-fresh", "emit": True}, format="json"+ )++ assert response.status_code == status.HTTP_200_OK+ config = SignalScoutConfig.objects.get(team=self.team, skill_name="signals-scout-fresh")+ assert config.emit is True+ assert config.run_interval_minutes == 120++ @parameterized.expand(+ [+ ("unknown_skill", "signals-scout-nonexistent"),+ ("non_scout_prefix", "my-ordinary-skill"),+ ]+ )+ def test_create_rejects_invalid_skill_name(self, _name: str, skill_name: str) -> None:+ if not skill_name.startswith("signals-scout-"):+ self._make_skill(skill_name)+ response = self.client.post(self._list_url(), data={"skill_name": skill_name}, format="json")+ assert response.status_code == status.HTTP_400_BAD_REQUEST+ assert not SignalScoutConfig.objects.filter(team=self.team, skill_name=skill_name).exists()++ def test_create_rejects_skill_belonging_to_another_team(self) -> None:+ other_team = Team.objects.create(organization=self.organization, name="other")+ self._make_skill("signals-scout-fresh", team=other_team)++ response = self.client.post(self._list_url(), data={"skill_name": "signals-scout-fresh"}, format="json")++ assert response.status_code == status.HTTP_400_BAD_REQUEST+ assert (+ not SignalScoutConfig.all_teams.filter(skill_name="signals-scout-fresh").exclude(team=other_team).exists()+ )++ def test_create_rejects_interval_below_min(self) -> None:+ self._make_skill("signals-scout-fresh")+ response = self.client.post(+ self._list_url(), data={"skill_name": "signals-scout-fresh", "run_interval_minutes": 5}, format="json"+ )+ assert response.status_code == status.HTTP_400_BAD_REQUESTdiff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex 2e5aa24bbb46..aec9cd9872d8 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -171,6 +171,30 @@ export interface SignalScoutConfigApi {readonly created_at: string}+/**+ * Request body for registering a scout config without waiting for the coordinator tick.+ *+ * Upsert keyed on `skill_name`: if the coordinator (or a concurrent caller) already+ * registered the row, the provided tunables are applied to it instead.+ */+export interface SignalScoutConfigCreateApi {+ /**+ * The `signals-scout-*` skill to register a config for. The skill must already exist on this project — author it via the skills store first.+ * @maxLength 200+ */+ skill_name: string+ /** Whether this scout runs on its schedule. Defaults to true. */+ enabled?: boolean+ /** Whether the scout writes findings to the inbox. False = dry-run: it runs and logs but emits nothing. Defaults to true. */+ emit?: boolean+ /**+ * Minutes between runs (10–43200). Defaults to 60 (hourly).+ * @minimum 10+ * @maximum 43200+ */+ run_interval_minutes?: number+}+/*** Per-(team, skill) scout config: schedule, enablement, and emit posture.*diff --git a/products/signals/frontend/generated/api.ts b/products/signals/frontend/generated/api.tsindex fef7318b18f4..cd3df31b77d8 100644--- a/products/signals/frontend/generated/api.ts+++ b/products/signals/frontend/generated/api.ts@@ -26,6 +26,7 @@ import type {SignalReportApi,SignalReportStateRequestApi,SignalScoutConfigApi,+ SignalScoutConfigCreateApi,SignalScoutEmissionApi,SignalScoutRunDetailApi,SignalScoutRunSummaryApi,@@ -205,7 +206,7 @@ export const getSignalsScoutConfigListUrl = (projectId: string) => {}/**- * List the per-(team, skill) scout configs for this project — schedule (`run_interval_minutes`), `enabled`, and `emit` posture per scout.+ * List the per-(team, skill) scout configs for this project — schedule (`run_interval_minutes`), `enabled`, and `emit` posture per scout. A freshly authored scout skill appears here once its config is registered, either explicitly via create or by the coordinator's next tick.* @summary List scout configs*/export const signalsScoutConfigList = async (@@ -218,6 +219,27 @@ export const signalsScoutConfigList = async (})}+export const getSignalsScoutConfigCreateUrl = (projectId: string) => {+ return `/api/projects/${projectId}/signals/scout/configs/`+}++/**+ * Register the config for a `signals-scout-*` skill immediately, without waiting for the coordinator to auto-register it — optionally setting `run_interval_minutes`, `enabled`, and `emit` in the same call. The skill must already exist on this project. Upsert: if a config already exists for the skill, the provided fields are applied to it.+ * @summary Create a scout config+ */+export const signalsScoutConfigCreate = async (+ projectId: string,+ signalScoutConfigCreateApi: SignalScoutConfigCreateApi,+ options?: RequestInit+): Promise<SignalScoutConfigApi> => {+ return apiMutator<SignalScoutConfigApi>(getSignalsScoutConfigCreateUrl(projectId), {+ ...options,+ method: 'POST',+ headers: { 'Content-Type': 'application/json', ...options?.headers },+ body: JSON.stringify(signalScoutConfigCreateApi),+ })+}+export const getSignalsScoutConfigUpdateUrl = (projectId: string, id: string) => {return `/api/projects/${projectId}/signals/scout/configs/${id}/`}diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.tsindex 370ee9700403..7cc359d9cb74 100644--- a/products/signals/frontend/generated/api.zod.ts+++ b/products/signals/frontend/generated/api.zod.ts@@ -67,6 +67,41 @@ export const SignalsReportsStateCreateBody = /* @__PURE__ */ zod.object({),})+/**+ * Register the config for a `signals-scout-*` skill immediately, without waiting for the coordinator to auto-register it — optionally setting `run_interval_minutes`, `enabled`, and `emit` in the same call. The skill must already exist on this project. Upsert: if a config already exists for the skill, the provided fields are applied to it.+ * @summary Create a scout config+ */+export const signalsScoutConfigCreateBodySkillNameMax = 200++export const signalsScoutConfigCreateBodyRunIntervalMinutesMin = 10+export const signalsScoutConfigCreateBodyRunIntervalMinutesMax = 43200++export const SignalsScoutConfigCreateBody = /* @__PURE__ */ zod+ .object({+ skill_name: zod+ .string()+ .max(signalsScoutConfigCreateBodySkillNameMax)+ .describe(+ 'The `signals-scout-\*` skill to register a config for. The skill must already exist on this project — author it via the skills store first.'+ ),+ enabled: zod.boolean().optional().describe('Whether this scout runs on its schedule. Defaults to true.'),+ emit: zod+ .boolean()+ .optional()+ .describe(+ 'Whether the scout writes findings to the inbox. False = dry-run: it runs and logs but emits nothing. Defaults to true.'+ ),+ run_interval_minutes: zod+ .number()+ .min(signalsScoutConfigCreateBodyRunIntervalMinutesMin)+ .max(signalsScoutConfigCreateBodyRunIntervalMinutesMax)+ .optional()+ .describe('Minutes between runs (10–43200). Defaults to 60 (hourly).'),+ })+ .describe(+ 'Request body for registering a scout config without waiting for the coordinator tick.\n\nUpsert keyed on `skill_name`: if the coordinator (or a concurrent caller) already\nregistered the row, the provided tunables are applied to it instead.'+ )+/*** Tune one scout: change its schedule (`run_interval_minutes`), `enabled`, or `emit` (dry-run) posture. `skill_name` is fixed. Enabling records `enabled_by` and is activity-logged since it drives spend.* @summary Update a scout configdiff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yamlindex c80a1229347c..8563e98292ff 100644--- a/products/signals/mcp/tools.yaml+++ b/products/signals/mcp/tools.yaml@@ -179,6 +179,22 @@ tools:required; `enabled` and `config` are optional and keep their current values if omitted). Prefer`inbox-source-configs-partial-update` when you only need to flip `enabled` or tweak `config`. Enabling thesession_analysis_cluster source requires the organization to have approved AI data processing.+ signals-scout-config-create:+ operation: signals_scout_config_create+ enabled: true+ scopes:+ - signal_scout:write+ annotations:+ readOnly: false+ destructive: false+ idempotent: true+ title: Create a scout config+ description: >+ Register the config for a freshly authored `signals-scout-*` skill immediately, without waiting for the+ coordinator to auto-register it — optionally setting its schedule (`run_interval_minutes`, 10–43200),+ `enabled`, and `emit` (false = dry-run) in the same call. The skill must already exist on the project+ (author it via the skills store first). Upsert: if a config already exists for the skill, the provided+ fields are applied to it. Creating an enabled config is activity-logged, since running a scout drives spend.signals-scout-config-list:operation: signals_scout_config_listenabled: true@@ -192,9 +208,10 @@ tools:title: List scout configsdescription: >List the per-scout configs for this project — one row per `signals-scout-*` skill, each with its schedule- (`run_interval_minutes`), `enabled` flag, and `emit` (dry-run) posture. Use this to see which scouts run,- how often, and whether they emit findings to the inbox. Pair with `signals-scout-config-update` to tune- them.+ (`run_interval_minutes`), `enabled` flag, and `emit` (dry-run) posture. A freshly authored scout appears+ once its config is registered — immediately via `signals-scout-config-create`, or on the coordinator's next+ tick. Use this to see which scouts run, how often, and whether they emit findings to the inbox. Pair with+ `signals-scout-config-update` to tune them.signals-scout-config-update:operation: signals_scout_config_updateenabled: truediff --git a/products/signals/skills/AGENTS.md b/products/signals/skills/AGENTS.mdindex da067f04f49d..da7709fc27da 100644--- a/products/signals/skills/AGENTS.md+++ b/products/signals/skills/AGENTS.md@@ -131,8 +131,9 @@ hourly) and a `last_run_at` stamp. Every tick the coordinator:`_participating_teams` → `_enrolled_team_ids`). Editing the payload in the flag UIenrolls or drains a team next tick — no manual seed.2. Auto-registers a config for any `signals-scout-*` skill missing one- (`_register_missing_configs`) — on an enrolled team, authoring a skill is enough- to get a scout.+ (`scout_harness/config_registry.register_missing_configs`) — on an enrolled team,+ authoring a skill is enough to get a scout. To register (and tune) one immediately+ instead, use the `signals-scout-config-create` endpoint.3. Dispatches every enabled scout whose schedule is due (`last_run_at is None`, or`now - last_run_at >= run_interval_minutes`), most-overdue first, capped at`MAX_RUNS_PER_TICK` per tick. Each due scout becomes one `RunSignalsScoutWorkflow`@@ -140,7 +141,9 @@ hourly) and a `last_run_at` stamp. Every tick the coordinator:Pausing a scout is `enabled=False` on its config; slowing it is a larger`run_interval_minutes`. Both are tunable via the `signals-scout-config-update` MCP-tool. See `scout_coordinator._collect_planned_runs` for the exact due-check.+tool, and settable at creation time via `signals-scout-config-create` (an upsert that+registers the config immediately instead of waiting for the tick). See+`scout_coordinator._collect_planned_runs` for the exact due-check.### Authoring a new scoutdiff --git a/products/signals/skills/authoring-signals-scouts/references/lifecycle-and-testing.md b/products/signals/skills/authoring-signals-scouts/references/lifecycle-and-testing.mdindex ce07203206b2..83bb672fdbf7 100644--- a/products/signals/skills/authoring-signals-scouts/references/lifecycle-and-testing.md+++ b/products/signals/skills/authoring-signals-scouts/references/lifecycle-and-testing.md@@ -10,7 +10,11 @@ exact mechanics; and how to test a scout in each.- **Config.** Each scout has one `SignalScoutConfig` per `(project, skill_name)` carrying`run_interval_minutes` (default 60), `enabled`, `emit`, and a `last_run_at` stamp. Aconfig is **auto-registered** the first time the coordinator sees a `signals-scout-*`- skill without one — authoring the skill is enough to get a scout.+ skill without one — authoring the skill is enough to get a scout. To configure a fresh+ scout immediately (instead of waiting for the tick), register the config yourself with+ `posthog:signals-scout-config-create`, setting the schedule / emit posture in the same+ call; until one of those happens, the scout has no config row and won't show in+ `-config-list`.- **Coordinator.** A periodic Temporal workflow ticks (~every 30 min). Each tick it boundscandidates to projects enrolled via the `signals-scout` feature-flag allowlist, thendispatches every **enabled** scout whose schedule is **due** (`last_run_at is None`, or@@ -22,7 +26,7 @@ exact mechanics; and how to test a scout in each.Pausing a scout = `enabled=false`. Slowing it = a larger `run_interval_minutes`. Dry-runningit = `emit=false`. All three via `posthog:signals-scout-config-update` (get the `id` from-`-config-list`).+`-config-list`), or set at creation time via `-config-create`.## Path A — per-team (skills store)@@ -40,6 +44,10 @@ posthog:llma-skill-get {"skill_name": "signals-scout-error-tracking"}# New scout from scratchposthog:llma-skill-create {"name": "signals-scout-<scope>", "description": "...", "body": "...", "compatibility": "...", "metadata": {"owner_team": "<team>", "scope": "<scope>"}}+# Register its config immediately with the schedule you want (otherwise the coordinator+# auto-registers an hourly default on its next tick)+posthog:signals-scout-config-create {"skill_name": "signals-scout-<scope>", "run_interval_minutes": 120}+# Adapt an existing per-team scout — use the SMALLEST primitive (find/replace, not full-body)posthog:llma-skill-get {"skill_name": "signals-scout-<scope>"} # get current version firstposthog:llma-skill-update {"skill_name": "signals-scout-<scope>", "base_version": N, "edits": [{"old": "...", "new": "..."}]}@@ -94,7 +102,7 @@ loop is **emit + inspect**: ship the scout live (`emit=true` is the default), leand calibrate against what actually lands.1. Ship with the default `emit=true` and a short `run_interval_minutes` (e.g. 10) so it- fires soon.+ fires soon — set both at creation via `posthog:signals-scout-config-create`.2. After a tick, inspect:- `posthog:inbox-reports-list` — the findings it actually emitted.- `posthog:signals-scout-runs-list` — run summaries.diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex 672ec4ca69bd..9b190415950c 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -5122,8 +5122,22 @@"readOnlyHint": true}},+ "signals-scout-config-create": {+ "description": "Register the config for a freshly authored `signals-scout-*` skill immediately, without waiting for the coordinator to auto-register it — optionally setting its schedule (`run_interval_minutes`, 10–43200), `enabled`, and `emit` (false = dry-run) in the same call. The skill must already exist on the project (author it via the skills store first). Upsert: if a config already exists for the skill, the provided fields are applied to it. Creating an enabled config is activity-logged, since running a scout drives spend.",+ "category": "Signals",+ "feature": "signals",+ "summary": "Create a scout config",+ "title": "Create a scout config",+ "required_scopes": ["signal_scout:write"],+ "annotations": {+ "destructiveHint": false,+ "idempotentHint": true,+ "openWorldHint": true,+ "readOnlyHint": false+ }+ },"signals-scout-config-list": {- "description": "List the per-scout configs for this project — one row per `signals-scout-*` skill, each with its schedule (`run_interval_minutes`), `enabled` flag, and `emit` (dry-run) posture. Use this to see which scouts run, how often, and whether they emit findings to the inbox. Pair with `signals-scout-config-update` to tune them.",+ "description": "List the per-scout configs for this project — one row per `signals-scout-*` skill, each with its schedule (`run_interval_minutes`), `enabled` flag, and `emit` (dry-run) posture. A freshly authored scout appears once its config is registered — immediately via `signals-scout-config-create`, or on the coordinator's next tick. Use this to see which scouts run, how often, and whether they emit findings to the inbox. Pair with `signals-scout-config-update` to tune them.","category": "Signals","feature": "signals","summary": "List scout configs",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 71faba0a1e96..ac521cb4bbf9 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -5463,8 +5463,22 @@"readOnlyHint": true}},+ "signals-scout-config-create": {+ "description": "Register the config for a freshly authored `signals-scout-*` skill immediately, without waiting for the coordinator to auto-register it — optionally setting its schedule (`run_interval_minutes`, 10–43200), `enabled`, and `emit` (false = dry-run) in the same call. The skill must already exist on the project (author it via the skills store first). Upsert: if a config already exists for the skill, the provided fields are applied to it. Creating an enabled config is activity-logged, since running a scout drives spend.",+ "category": "Signals",+ "feature": "signals",+ "summary": "Create a scout config",+ "title": "Create a scout config",+ "required_scopes": ["signal_scout:write"],+ "annotations": {+ "destructiveHint": false,+ "idempotentHint": true,+ "openWorldHint": true,+ "readOnlyHint": false+ }+ },"signals-scout-config-list": {- "description": "List the per-scout configs for this project — one row per `signals-scout-*` skill, each with its schedule (`run_interval_minutes`), `enabled` flag, and `emit` (dry-run) posture. Use this to see which scouts run, how often, and whether they emit findings to the inbox. Pair with `signals-scout-config-update` to tune them.",+ "description": "List the per-scout configs for this project — one row per `signals-scout-*` skill, each with its schedule (`run_interval_minutes`), `enabled` flag, and `emit` (dry-run) posture. A freshly authored scout appears once its config is registered — immediately via `signals-scout-config-create`, or on the coordinator's next tick. Use this to see which scouts run, how often, and whether they emit findings to the inbox. Pair with `signals-scout-config-update` to tune them.","category": "Signals","feature": "signals","summary": "List scout configs",diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex ae7f84cf44b9..7c6d3dc949c7 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -39625,6 +39625,30 @@ export namespace Schemas {readonly created_at: string;}+ /**+ * Request body for registering a scout config without waiting for the coordinator tick.+ *+ * Upsert keyed on `skill_name`: if the coordinator (or a concurrent caller) already+ * registered the row, the provided tunables are applied to it instead.+ */+ export interface SignalScoutConfigCreate {+ /**+ * The `signals-scout-*` skill to register a config for. The skill must already exist on this project — author it via the skills store first.+ * @maxLength 200+ */+ skill_name: string;+ /** Whether this scout runs on its schedule. Defaults to true. */+ enabled?: boolean;+ /** Whether the scout writes findings to the inbox. False = dry-run: it runs and logs but emits nothing. Defaults to true. */+ emit?: boolean;+ /**+ * Minutes between runs (10–43200). Defaults to 60 (hourly).+ * @minimum 10+ * @maximum 43200+ */+ run_interval_minutes?: number;+ }+/*** One finding a scout run emitted to the inbox — the persisted, queryable record of* *what* the run surfaced, returned by `signals-scout-runs-emissions-list`. The emitted textdiff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.tsindex dea25c989e26..37faec04c2de 100644--- a/services/mcp/src/generated/signals/api.ts+++ b/services/mcp/src/generated/signals/api.ts@@ -3,7 +3,7 @@* MCP service uses these Zod schemas for generated tool handlers.* To regenerate: hogli build:openapi*- * PostHog API - MCP 18 enabled ops+ * PostHog API - MCP 19 enabled ops* OpenAPI spec version: 1.0.0*/import * as zod from 'zod'@@ -120,7 +120,7 @@ export const SignalsReportsStateCreateBody = /* @__PURE__ */ zod.object({})/**- * List the per-(team, skill) scout configs for this project — schedule (`run_interval_minutes`), `enabled`, and `emit` posture per scout.+ * List the per-(team, skill) scout configs for this project — schedule (`run_interval_minutes`), `enabled`, and `emit` posture per scout. A freshly authored scout skill appears here once its config is registered, either explicitly via create or by the coordinator's next tick.* @summary List scout configs*/export const SignalsScoutConfigListParams = /* @__PURE__ */ zod.object({@@ -131,6 +131,49 @@ export const SignalsScoutConfigListParams = /* @__PURE__ */ zod.object({),})+/**+ * Register the config for a `signals-scout-*` skill immediately, without waiting for the coordinator to auto-register it — optionally setting `run_interval_minutes`, `enabled`, and `emit` in the same call. The skill must already exist on this project. Upsert: if a config already exists for the skill, the provided fields are applied to it.+ * @summary Create a scout config+ */+export const SignalsScoutConfigCreateParams = /* @__PURE__ */ zod.object({+ project_id: zod+ .string()+ .describe(+ "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."+ ),+})++export const signalsScoutConfigCreateBodySkillNameMax = 200++export const signalsScoutConfigCreateBodyRunIntervalMinutesMin = 10+export const signalsScoutConfigCreateBodyRunIntervalMinutesMax = 43200++export const SignalsScoutConfigCreateBody = /* @__PURE__ */ zod+ .object({+ skill_name: zod+ .string()+ .max(signalsScoutConfigCreateBodySkillNameMax)+ .describe(+ 'The `signals-scout-*` skill to register a config for. The skill must already exist on this project — author it via the skills store first.'+ ),+ enabled: zod.boolean().optional().describe('Whether this scout runs on its schedule. Defaults to true.'),+ emit: zod+ .boolean()+ .optional()+ .describe(+ 'Whether the scout writes findings to the inbox. False = dry-run: it runs and logs but emits nothing. Defaults to true.'+ ),+ run_interval_minutes: zod+ .number()+ .min(signalsScoutConfigCreateBodyRunIntervalMinutesMin)+ .max(signalsScoutConfigCreateBodyRunIntervalMinutesMax)+ .optional()+ .describe('Minutes between runs (10–43200). Defaults to 60 (hourly).'),+ })+ .describe(+ 'Request body for registering a scout config without waiting for the coordinator tick.\n\nUpsert keyed on `skill_name`: if the coordinator (or a concurrent caller) already\nregistered the row, the provided tunables are applied to it instead.'+ )+/*** Tune one scout: change its schedule (`run_interval_minutes`), `enabled`, or `emit` (dry-run) posture. `skill_name` is fixed. Enabling records `enabled_by` and is activity-logged since it drives spend.* @summary Update a scout configdiff --git a/services/mcp/src/tools/generated/signals.ts b/services/mcp/src/tools/generated/signals.tsindex 15ee6b366578..a75d8328ff3c 100644--- a/services/mcp/src/tools/generated/signals.ts+++ b/services/mcp/src/tools/generated/signals.ts@@ -7,6 +7,7 @@ import {SignalsReportsRetrieveParams,SignalsReportsStateCreateBody,SignalsReportsStateCreateParams,+ SignalsScoutConfigCreateBody,SignalsScoutConfigUpdateBody,SignalsScoutConfigUpdateParams,SignalsScoutEmitSignalBody,@@ -281,6 +282,35 @@ const inboxSourceConfigsUpdate = (): ToolBase<typeof InboxSourceConfigsUpdateSch},})+const SignalsScoutConfigCreateSchema = SignalsScoutConfigCreateBody++const signalsScoutConfigCreate = (): ToolBase<typeof SignalsScoutConfigCreateSchema, Schemas.SignalScoutConfig> => ({+ name: 'signals-scout-config-create',+ schema: SignalsScoutConfigCreateSchema,+ handler: async (context: Context, params: z.infer<typeof SignalsScoutConfigCreateSchema>) => {+ const projectId = await context.stateManager.getProjectId()+ const body: Record<string, unknown> = {}+ if (params.skill_name !== undefined) {+ body['skill_name'] = params.skill_name+ }+ if (params.enabled !== undefined) {+ body['enabled'] = params.enabled+ }+ if (params.emit !== undefined) {+ body['emit'] = params.emit+ }+ if (params.run_interval_minutes !== undefined) {+ body['run_interval_minutes'] = params.run_interval_minutes+ }+ const result = await context.api.request<Schemas.SignalScoutConfig>({+ method: 'POST',+ path: `/api/projects/${encodeURIComponent(String(projectId))}/signals/scout/configs/`,+ body,+ })+ return result+ },+})+const SignalsScoutConfigListSchema = z.object({})const signalsScoutConfigList = (): ToolBase<@@ -546,6 +576,7 @@ export const GENERATED_TOOLS: Record<string, () => ToolBase<ZodObjectAny>> = {'inbox-source-configs-partial-update': inboxSourceConfigsPartialUpdate,'inbox-source-configs-retrieve': inboxSourceConfigsRetrieve,'inbox-source-configs-update': inboxSourceConfigsUpdate,+ 'signals-scout-config-create': signalsScoutConfigCreate,'signals-scout-config-list': signalsScoutConfigList,'signals-scout-config-update': signalsScoutConfigUpdate,'signals-scout-emit-signal': signalsScoutEmitSignal,diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-create.jsonnew file mode 100644index 000000000000..f61152fd3112--- /dev/null+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-create.json@@ -0,0 +1,27 @@+{+ "$schema": "https://json-schema.org/draft/2020-12/schema",+ "description": "Request body for registering a scout config without waiting for the coordinator tick.\n\nUpsert keyed on `skill_name`: if the coordinator (or a concurrent caller) already\nregistered the row, the provided tunables are applied to it instead.",+ "properties": {+ "emit": {+ "description": "Whether the scout writes findings to the inbox. False = dry-run: it runs and logs but emits nothing. Defaults to true.",+ "type": "boolean"+ },+ "enabled": {+ "description": "Whether this scout runs on its schedule. Defaults to true.",+ "type": "boolean"+ },+ "run_interval_minutes": {+ "description": "Minutes between runs (10–43200). Defaults to 60 (hourly).",+ "maximum": 43200,+ "minimum": 10,+ "type": "number"+ },+ "skill_name": {+ "description": "The `signals-scout-*` skill to register a config for. The skill must already exist on this project — author it via the skills store first.",+ "maxLength": 200,+ "type": "string"+ }+ },+ "required": ["skill_name"],+ "type": "object"+}