: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
chore(signals): declare the openapi schema for the config and report actions (#104249)
Julian Bez6a479f718c91
diff --git a/.semgrep/rules/devex/prefer-codegen-api-namespaced.test.ts b/.semgrep/rules/devex/prefer-codegen-api-namespaced.test.tsindex e96abd83691d..eafb58672ae0 100644--- a/.semgrep/rules/devex/prefer-codegen-api-namespaced.test.ts+++ b/.semgrep/rules/devex/prefer-codegen-api-namespaced.test.ts@@ -24,9 +24,9 @@ const e = await api.signalSourceConfigs.runs.list({ limit: 10 })// ruleid: prefer-codegen-api-namespaced-error_trackingconst f = await api.errorTracking.symbolSets.bulkDelete(ids)-// A namespace no generated client covers stays allowed.+// A core namespace is no product's to enforce.// ok: prefer-codegen-api-namespaced-signals-const g = await api.signalTeamConfig.get()+const g = await api.tags.list(projectId)// A namespace whose routes the generated clients gained is enforced from then on.// ruleid: prefer-codegen-api-namespaced-posthog_aidiff --git a/.semgrep/rules/devex/prefer-codegen-api-namespaced.yaml b/.semgrep/rules/devex/prefer-codegen-api-namespaced.yamlindex 683139ba9d1f..45b8125fa2b1 100644--- a/.semgrep/rules/devex/prefer-codegen-api-namespaced.yaml+++ b/.semgrep/rules/devex/prefer-codegen-api-namespaced.yaml@@ -1169,6 +1169,8 @@ rules:- pattern: api.signalReports.$MEMBER.$METHOD(...)- pattern: api.signalSourceConfigs.$METHOD(...)- pattern: api.signalSourceConfigs.$MEMBER.$METHOD(...)+ - pattern: api.signalTeamConfig.$METHOD(...)+ - pattern: api.signalTeamConfig.$MEMBER.$METHOD(...)paths:include:- '/products/signals/frontend/'diff --git a/frontend/src/lib/api-ratchet-baseline.txt b/frontend/src/lib/api-ratchet-baseline.txtindex cfb70d380823..9cefc7356721 100644--- a/frontend/src/lib/api-ratchet-baseline.txt+++ b/frontend/src/lib/api-ratchet-baseline.txt@@ -235,6 +235,7 @@ signalReport projects/{}/signals/reports/{}signalReports projects/{}/signals/reportssignalSourceConfig projects/{}/signals/source_configs/{}signalSourceConfigs projects/{}/signals/source_configs+signalTeamConfig projects/{}/signals/configsubscription projects/{}/subscriptions/{}subscriptions projects/{}/subscriptionssurvey projects/{}/surveys/{}diff --git a/products/signals/backend/serializers.py b/products/signals/backend/serializers.pyindex 60d547b86b2b..1490ac3a96f5 100644--- a/products/signals/backend/serializers.py+++ b/products/signals/backend/serializers.py@@ -8,7 +8,7 @@ from django.db.models import TextChoicesfrom django.utils import timezonefrom drf_spectacular.types import OpenApiTypes-from drf_spectacular.utils import PolymorphicProxySerializer, extend_schema_field+from drf_spectacular.utils import PolymorphicProxySerializer, extend_schema_field, extend_schema_serializerfrom rest_framework import serializersfrom rest_framework.request import Request@@ -298,6 +298,32 @@ class SignalSourceConfigSerializer(serializers.ModelSerializer):MAX_AUTOSTART_BASE_BRANCH_ENTRIES = 500+_AUTOSTART_BASE_BRANCHES_HELP = (+ "Per-repository base branch overrides for auto-started inbox PRs, keyed by "+ "'organization/repository'. The branch is what the auto-PR targets; omit a repo "+ "(or send {}) to keep targeting the repo default branch."+)++# The validator below bounds the key count, the key shape and the key length. A DictField publishes+# only the value constraint, so the key rules are declared here to keep the schema and the validator+# saying the same thing.+_AUTOSTART_BASE_BRANCHES_SCHEMA = {+ "type": "object",+ "description": _AUTOSTART_BASE_BRANCHES_HELP,+ "maxProperties": MAX_AUTOSTART_BASE_BRANCH_ENTRIES,+ "propertyNames": {"pattern": "^[^/]+/[^/]+$", "maxLength": 255},+ "additionalProperties": {"type": "string", "maxLength": 255},+}+++@extend_schema_field(_AUTOSTART_BASE_BRANCHES_SCHEMA)+class _AutostartBaseBranchesField(serializers.DictField):+ pass+++# many=False: the read action is named `list` for routing, but the config is a per-project+# singleton. Without this drf-spectacular types the response as a paginated list.+@extend_schema_serializer(many=False)class SignalTeamConfigSerializer(serializers.ModelSerializer):issue_tracking_integration = TeamScopedPrimaryKeyRelatedField(queryset=Integration.objects.all(),@@ -319,14 +345,10 @@ class SignalTeamConfigSerializer(serializers.ModelSerializer):"to created GitHub issues."),)- autostart_base_branches = serializers.DictField(+ autostart_base_branches = _AutostartBaseBranchesField(child=serializers.CharField(max_length=255, allow_blank=True),required=False,- help_text=(- "Per-repository base branch overrides for auto-started inbox PRs, keyed by "- "'organization/repository'. The branch is what the auto-PR targets; omit a repo "- "(or send {}) to keep targeting the repo default branch."- ),+ help_text=_AUTOSTART_BASE_BRANCHES_HELP,)max_reports_per_day = serializers.IntegerField(required=False,@@ -1982,13 +2004,14 @@ class SuggestedReviewerEntryWriteSerializer(serializers.Serializer):required=False,allow_blank=False,max_length=200,- help_text="GitHub login (case-insensitive). Stored lowercased.",+ help_text="GitHub login (case-insensitive). Stored lowercased. Required unless `user_uuid` is given.",)user_uuid = serializers.UUIDField(required=False,help_text=("PostHog user UUID. Must be an org member on this team; a linked GitHub account is not "- "required. If supplied together with `github_login`, the user's own identity wins."+ "required. Required unless `github_login` is given. If supplied together with "+ "`github_login`, the user's own identity wins."),)github_name = serializers.CharField(@@ -2014,6 +2037,67 @@ class SuggestedReviewerEntryWriteSerializer(serializers.Serializer):return attrs+class SuggestedReviewerCommitSerializer(serializers.Serializer):+ """Commit evidence behind a suggested reviewer."""++ sha = serializers.CharField(help_text="Commit SHA.")+ url = serializers.CharField(help_text="Link to the commit.")+ reason = serializers.CharField(allow_blank=True, help_text="Why the commit makes this reviewer relevant.")+++class SuggestedReviewerEntryReadSerializer(serializers.Serializer):+ """One reviewer as the read path returns it: the stored entry plus read-time enrichment.++ `source_label`, `explanation` and `user` are computed on read, not stored, so a caller cannot+ write them.+ """++ github_login = serializers.CharField(+ allow_null=True, help_text="GitHub login, lowercased. Null when the reviewer has no linked account."+ )+ user_uuid = serializers.CharField(+ allow_null=True,+ help_text="PostHog user this entry routes to. Null on entries written before reviewers had one.",+ )+ github_name = serializers.CharField(allow_null=True, help_text="Display name, when the writer supplied one.")+ relevant_commits = SuggestedReviewerCommitSerializer(+ many=True, help_text="Commits attributed to this reviewer. Empty when the pick came from elsewhere."+ )+ reason = serializers.CharField(allow_null=True, help_text="Why this reviewer was chosen.")+ is_skill_owner = serializers.BooleanField(+ help_text="True when the scout owner guardrail added the entry rather than commit authorship."+ )+ source_skill = serializers.CharField(+ allow_null=True, help_text="Scout skill whose run wrote the entry. Null when no scout did."+ )+ source_label = serializers.CharField(help_text="Where the suggestion came from, for display.")+ explanation = serializers.CharField(+ allow_null=True, help_text="One line of evidence for display. Null when there is none to show."+ )+ user = _UserSerializer(allow_null=True, help_text="Resolved org member. Null when the entry resolves to nobody.")+++class SignalReportSuggestedReviewersArtefactSerializer(SignalReportArtefactSerializer):+ """The artefact, for a path that only ever returns a `suggested_reviewers` one.++ `content` is polymorphic on the base serializer, so a generated client types it as unknown.+ Here the type is fixed, so the entry shape can be declared. Runtime output is unchanged —+ `get_content` delegates to the base.+ """++ # The path only returns this one type, so narrowing the discriminator lets a client match on it+ # instead of the whole artefact enum.+ type = serializers.ChoiceField(+ choices=[SignalReportArtefact.ArtefactType.SUGGESTED_REVIEWERS],+ read_only=True,+ help_text="Always `suggested_reviewers` on this path.",+ )++ @extend_schema_field(SuggestedReviewerEntryReadSerializer(many=True))+ def get_content(self, obj: SignalReportArtefact) -> dict | list:+ return super().get_content(obj)++class SignalReportArtefactWriteSerializer(serializers.Serializer):"""PUT body for replacing a `suggested_reviewers` artefact's content.@@ -2023,19 +2107,17 @@ class SignalReportArtefactWriteSerializer(serializers.Serializer):MAX_ENTRIES = 10- content = SuggestedReviewerEntryWriteSerializer(- many=True,+ # ListField rather than the serializer with many=True: drf-spectacular returns early for a+ # nested many=True serializer, so a cap declared there never reaches the schema as maxItems.+ content = serializers.ListField(+ child=SuggestedReviewerEntryWriteSerializer(),allow_empty=True,+ max_length=MAX_ENTRIES,help_text=(f"Full replacement list of reviewers. Empty list clears the artefact. At most {MAX_ENTRIES} entries."),)- def validate_content(self, value: list[dict]) -> list[dict]:- if len(value) > self.MAX_ENTRIES:- raise serializers.ValidationError(f"At most {self.MAX_ENTRIES} reviewers may be supplied.")- return value-# Writable types only — `video_segment` (and any other NON_WRITABLE type) is read-only and rejected# by the write API, so it must not be advertised as an option here.diff --git a/products/signals/backend/views.py b/products/signals/backend/views.pyindex 649c48bc7d0b..78d1565a0f50 100644--- a/products/signals/backend/views.py+++ b/products/signals/backend/views.py@@ -179,6 +179,7 @@ from products.signals.backend.serializers import (SignalReportMetricRefreshResponseSerializer,SignalReportRefundSerializer,SignalReportSerializer,+ SignalReportSuggestedReviewersArtefactSerializer,SignalSourceConfigSerializer,SignalTeamConfigSerializer,SignalUserAutonomyConfigCreateSerializer,@@ -504,6 +505,8 @@ class SignalTeamConfigViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):serializer_class = SignalTeamConfigSerializerqueryset = SignalTeamConfig.objects.all()scope_object = "task"+ # The read returns the singleton, so the inherited limit and offset params are noise.+ pagination_class = Nonedef dangerously_get_required_scopes(self, request: Request, view) -> list[str] | None:if request.method in ("GET", "HEAD", "OPTIONS"):@@ -517,11 +520,15 @@ class SignalTeamConfigViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):# notification channel) would 404.return get_or_create_team_extension(self.team, SignalTeamConfig)- @extend_schema(exclude=True)+ @extend_schema(summary="Read the project's signals config")def list(self, request: Request, *args, **kwargs) -> Response:return Response(SignalTeamConfigSerializer(self._get_config()).data)- @extend_schema(exclude=True)+ @extend_schema(+ summary="Update the project's signals config",+ description="Partial update of the per-project singleton. Omitted fields keep their value.",+ responses={200: SignalTeamConfigSerializer},+ )def create(self, request: Request, *args, **kwargs) -> Response:config = self._get_config()serializer = self.get_serializer(config, data=request.data, partial=True)@@ -968,8 +975,42 @@ def _is_person_at_the_ui(request: Request) -> bool:)+# Each action reports only its own outcomes, so the two sets stay separate rather than becoming one+# union that would admit a deletion status on the reingest response.+SIGNAL_REPORT_DELETION_STATUSES = ["deletion_started", "already_running"]+SIGNAL_REPORT_REINGESTION_STATUSES = ["reingestion_started", "already_running"]+++class SignalReportDeletionStatusSerializer(serializers.Serializer):+ """Envelope the report delete returns once it has kicked off the deletion workflow."""++ status = serializers.ChoiceField(+ choices=SIGNAL_REPORT_DELETION_STATUSES,+ help_text="Whether this request started the deletion or found one already running.",+ )+ report_id = serializers.UUIDField(help_text="Report being deleted.")+++class SignalReportReingestionStatusSerializer(serializers.Serializer):+ """Envelope the reingest action returns once it has kicked off the re-ingestion workflow."""++ status = serializers.ChoiceField(+ choices=SIGNAL_REPORT_REINGESTION_STATUSES,+ help_text="Whether this request started the re-ingestion or found one already running.",+ )+ report_id = serializers.UUIDField(help_text="Report being re-ingested.")++@extend_schema_view(- destroy=extend_schema(exclude=True),+ destroy=extend_schema(+ summary="Delete a signal report",+ responses={+ 200: OpenApiResponse(+ response=SignalReportDeletionStatusSerializer, description="A deletion is already running."+ ),+ 202: OpenApiResponse(response=SignalReportDeletionStatusSerializer, description="Deletion started."),+ },+ ),)class SignalReportViewSet(TeamAndOrgViewSetMixin,@@ -2224,7 +2265,35 @@ class SignalReportViewSet(return self.get_paginated_response(data)return Response(data)- @extend_schema(exclude=True)+ @extend_schema(+ summary="List the org members who can be suggested as reviewers",+ parameters=[+ OpenApiParameter(+ name="query",+ type=OpenApiTypes.STR,+ location=OpenApiParameter.QUERY,+ required=False,+ description="Case-insensitive filter on name or email.",+ )+ ],+ # A map keyed by user UUID, so there is no serializer shape to declare.+ responses={+ 200: OpenApiResponse(+ response={+ "type": "object",+ "additionalProperties": {+ "type": "object",+ "properties": {+ "name": {"type": "string", "description": "Member's full name."},+ "email": {"type": "string", "description": "Member's email address."},+ },+ "required": ["name", "email"],+ },+ },+ description="Candidate reviewers keyed by user UUID.",+ )+ },+ )@action(detail=False, methods=["get"], url_path="available_reviewers", required_scopes=["task:read"])def available_reviewers(self, request, **kwargs):with tracer.start_as_current_span("signals.available_reviewers") as span:@@ -2287,7 +2356,11 @@ class SignalReportViewSet(return Response(reviewers)- @extend_schema(exclude=True)+ @extend_schema(+ summary="Set a report's suggested reviewers",+ request=SignalReportArtefactWriteSerializer,+ responses={200: SignalReportSuggestedReviewersArtefactSerializer},+ )@action(detail=True, methods=["put"], url_path="reviewers", required_scopes=["task:write"])def reviewers(self, request, **kwargs):"""Set a report's suggested reviewers (full-replacement PUT), whether or not the report already@@ -3279,7 +3352,16 @@ class SignalReportViewSet(})- @extend_schema(exclude=True)+ @extend_schema(+ summary="Re-ingest a report's signals",+ request=None,+ responses={+ 200: OpenApiResponse(+ response=SignalReportReingestionStatusSerializer, description="A re-ingestion is already running."+ ),+ 202: OpenApiResponse(response=SignalReportReingestionStatusSerializer, description="Re-ingestion started."),+ },+ )@action(detail=True, methods=["post"], url_path="reingest", required_scopes=["task:write"])def reingest(self, request, pk=None, **kwargs):"""Re-ingest a report's signals (same team access as other report actions)."""diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex 610575eeafd3..cc2027b23a12 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -7,6 +7,86 @@* PostHog API - generated* OpenAPI spec version: 1.0.0*/+/**+ * Per-repository base branch overrides for auto-started inbox PRs, keyed by 'organization/repository'. The branch is what the auto-PR targets; omit a repo (or send {}) to keep targeting the repo default branch.+ */+export type SignalTeamConfigApiAutostartBaseBranches = { [key: string]: string }++/**+ * Where in the tracker the issues land. Required keys depend on the integration kind: github -> {repository}; linear -> {team_id}; jira -> {project_key}; gitlab needs none, because its integration is already bound to one project. An optional 'label' is applied to created GitHub issues.+ */+export type SignalTeamConfigApiIssueTrackingConfig = { [key: string]: string }++/**+ * * `P0` - P0+ * * `P1` - P1+ * * `P2` - P2+ * * `P3` - P3+ * * `P4` - P4+ */+export type AutonomyPriorityEnumApi = (typeof AutonomyPriorityEnumApi)[keyof typeof AutonomyPriorityEnumApi]++export const AutonomyPriorityEnumApi = {+ P0: 'P0',+ P1: 'P1',+ P2: 'P2',+ P3: 'P3',+ P4: 'P4',+} as const++export interface SignalTeamConfigApi {+ readonly id: string+ /**+ * Master switch for autonomous inbox PRs. Null (never set) leaves autostart on; set false to opt out, so actionable reports still generate and notify but the team never auto-starts an implementation task or opens a PR — reviewers open PRs manually.+ * @nullable+ */+ autostart_enabled?: boolean | null+ default_autostart_priority?: AutonomyPriorityEnumApi+ /**+ * Default Slack channel for this team's signal inbox notifications, in the same `channel_id|#channel-name` shape PostHog uses elsewhere (only the channel id is required). Null means no team-level default; per-user channels still apply.+ * @maxLength 255+ * @nullable+ */+ default_slack_notification_channel?: string | null+ /** Per-repository base branch overrides for auto-started inbox PRs, keyed by 'organization/repository'. The branch is what the auto-PR targets; omit a repo (or send {}) to keep targeting the repo default branch. */+ autostart_base_branches?: SignalTeamConfigApiAutostartBaseBranches+ /**+ * Connected GitHub, GitLab, Linear, or Jira integration that self-driving opens a tracker issue in for each pull request it makes. Null turns tracker issues off, which is the default.+ * @nullable+ */+ issue_tracking_integration?: number | null+ /** Where in the tracker the issues land. Required keys depend on the integration kind: github -> {repository}; linear -> {team_id}; jira -> {project_key}; gitlab needs none, because its integration is already bound to one project. An optional 'label' is applied to created GitHub issues. */+ issue_tracking_config?: SignalTeamConfigApiIssueTrackingConfig+ /**+ * Daily cap on new reports surfacing to the inbox, counted per calendar day in the project's timezone. Once reached, signal ingestion, scout runs, and report research pause until local midnight. Null means unlimited.+ * @minimum 1+ * @maximum 2147483647+ * @nullable+ */+ max_reports_per_day?: number | null+ /** Whether self-driving pull requests open ready for review instead of draft, so the full CI matrix starts when the pull request is created. False by default. A reviewer's own github_open_pull_request_ready overrides this for reports that suggest them as reviewer. */+ default_open_pull_request_ready?: boolean+ /** Whether self-driving comments back on a GitHub issue that raised a report, linking to the report so everybody watching the issue knows it is being researched. The comment is public on the issue thread and carries a link only, never report content. False by default. Needs a GitHub integration that can reach the issue's repository. */+ github_issue_writeback_enabled?: boolean+ /** Whether self-driving adds a label to every pull request it opens, so GitHub search, saved searches, and notification rules can separate them from other automation on the repository. False by default. Needs a GitHub integration that can reach the repository. */+ pull_request_label_enabled?: boolean+ /**+ * The label name self-driving applies, at most 50 characters. Null or blank means 'self-driving'. The label is created in the repository when it does not exist yet. Only used while pull_request_label_enabled is true.+ * @maxLength 50+ * @nullable+ */+ pull_request_label?: string | null+ /**+ * How many reports first became visible in the inbox during the current project-timezone day. This is the count the daily report limit compares against.+ * @minimum 0+ */+ readonly reports_generated_today: number+ /** Whether the team hit its daily report limit, pausing new report generation until local midnight. Always false when max_reports_per_day is null. */+ readonly daily_report_limit_reached: boolean+ readonly created_at: string+ readonly updated_at: string+}+export interface PauseStateResponseApi {/*** The timestamp the pipeline is paused until, or null if not paused/not running.@@ -761,6 +841,31 @@ export interface PatchedSignalReportContentUpdateApi {summary?: string}+/**+ * * `deletion_started` - deletion_started+ * * `already_running` - already_running+ */+export type SignalReportDeletionStatusStatusEnumApi =+ (typeof SignalReportDeletionStatusStatusEnumApi)[keyof typeof SignalReportDeletionStatusStatusEnumApi]++export const SignalReportDeletionStatusStatusEnumApi = {+ DeletionStarted: 'deletion_started',+ AlreadyRunning: 'already_running',+} as const++/**+ * Envelope the report delete returns once it has kicked off the deletion workflow.+ */+export interface SignalReportDeletionStatusApi {+ /** Whether this request started the deletion or found one already running.+ *+ * * `deletion_started` - deletion_started+ * * `already_running` - already_running */+ status: SignalReportDeletionStatusStatusEnumApi+ /** Report being deleted. */+ report_id: string+}+export interface SignalReportClaimApi {/** Active claim ID returned by an earlier call. Stale claims are rejected. */claim_id?: string@@ -1150,6 +1255,185 @@ export interface SignalReportRefundResponseApi {readonly already_refunded: boolean}+/**+ * * `reingestion_started` - reingestion_started+ * * `already_running` - already_running+ */+export type SignalReportReingestionStatusStatusEnumApi =+ (typeof SignalReportReingestionStatusStatusEnumApi)[keyof typeof SignalReportReingestionStatusStatusEnumApi]++export const SignalReportReingestionStatusStatusEnumApi = {+ ReingestionStarted: 'reingestion_started',+ AlreadyRunning: 'already_running',+} as const++/**+ * Envelope the reingest action returns once it has kicked off the re-ingestion workflow.+ */+export interface SignalReportReingestionStatusApi {+ /** Whether this request started the re-ingestion or found one already running.+ *+ * * `reingestion_started` - reingestion_started+ * * `already_running` - already_running */+ status: SignalReportReingestionStatusStatusEnumApi+ /** Report being re-ingested. */+ report_id: string+}++/**+ * Single entry in a PUT body for a `suggested_reviewers` artefact.+ *+ * Each entry must identify a reviewer by at least one of `github_login` or `user_uuid`. A+ * `user_uuid` only has to name an org member on this team — a member with no linked GitHub+ * account is stored by uuid and routes like any other reviewer.+ */+export interface SuggestedReviewerEntryWriteApi {+ /**+ * GitHub login (case-insensitive). Stored lowercased. Required unless `user_uuid` is given.+ * @maxLength 200+ */+ github_login?: string+ /** PostHog user UUID. Must be an org member on this team; a linked GitHub account is not required. Required unless `github_login` is given. If supplied together with `github_login`, the user's own identity wins. */+ user_uuid?: string+ /**+ * Optional human-readable display name. Not backfilled from GitHub by the server.+ * @maxLength 200+ */+ github_name?: string+ /**+ * Optional short evidence for why this reviewer was chosen. Omitted entries keep the prior reason for reviewers already on the report.+ * @maxLength 500+ * @nullable+ */+ reason?: string | null+}++/**+ * PUT body for replacing a `suggested_reviewers` artefact's content.+ *+ * Only `suggested_reviewers` artefacts may be modified via this endpoint;+ * the viewset enforces the type check before validation runs.+ */+export interface SignalReportArtefactWriteApi {+ /**+ * Full replacement list of reviewers. Empty list clears the artefact. At most 10 entries.+ * @maxItems 10+ */+ content: SuggestedReviewerEntryWriteApi[]+}++/**+ * * `suggested_reviewers` - suggested_reviewers+ */+export type SignalReportSuggestedReviewersArtefactTypeEnumApi =+ (typeof SignalReportSuggestedReviewersArtefactTypeEnumApi)[keyof typeof SignalReportSuggestedReviewersArtefactTypeEnumApi]++export const SignalReportSuggestedReviewersArtefactTypeEnumApi = {+ SuggestedReviewers: 'suggested_reviewers',+} as const++/**+ * Commit evidence behind a suggested reviewer.+ */+export interface SuggestedReviewerCommitApi {+ /** Commit SHA. */+ sha: string+ /** Link to the commit. */+ url: string+ /** Why the commit makes this reviewer relevant. */+ reason: string+}++/**+ * One reviewer as the read path returns it: the stored entry plus read-time enrichment.+ *+ * `source_label`, `explanation` and `user` are computed on read, not stored, so a caller cannot+ * write them.+ */+export interface SuggestedReviewerEntryReadApi {+ /**+ * GitHub login, lowercased. Null when the reviewer has no linked account.+ * @nullable+ */+ github_login: string | null+ /**+ * PostHog user this entry routes to. Null on entries written before reviewers had one.+ * @nullable+ */+ user_uuid: string | null+ /**+ * Display name, when the writer supplied one.+ * @nullable+ */+ github_name: string | null+ /** Commits attributed to this reviewer. Empty when the pick came from elsewhere. */+ relevant_commits: SuggestedReviewerCommitApi[]+ /**+ * Why this reviewer was chosen.+ * @nullable+ */+ reason: string | null+ /** True when the scout owner guardrail added the entry rather than commit authorship. */+ is_skill_owner: boolean+ /**+ * Scout skill whose run wrote the entry. Null when no scout did.+ * @nullable+ */+ source_skill: string | null+ /** Where the suggestion came from, for display. */+ source_label: string+ /**+ * One line of evidence for display. Null when there is none to show.+ * @nullable+ */+ explanation: string | null+ /** Resolved org member. Null when the entry resolves to nobody. */+ user: _UserApi | null+}++/**+ * The artefact, for a path that only ever returns a `suggested_reviewers` one.+ *+ * `content` is polymorphic on the base serializer, so a generated client types it as unknown.+ * Here the type is fixed, so the entry shape can be declared. Runtime output is unchanged —+ * `get_content` delegates to the base.+ */+export interface SignalReportSuggestedReviewersArtefactApi {+ /**+ * Work claim that produced this artefact.+ * @nullable+ */+ readonly claim_id: string | null+ /**+ * Shared PR record linked by this artefact.+ * @nullable+ */+ readonly pull_request_id: string | null+ readonly id: string+ /** Always `suggested_reviewers` on this path.+ *+ * * `suggested_reviewers` - suggested_reviewers */+ readonly type: SignalReportSuggestedReviewersArtefactTypeEnumApi+ readonly content: readonly SuggestedReviewerEntryReadApi[]+ readonly created_at: string+ /** @nullable */+ readonly updated_at: string | null+ /** Actor kind. Legacy rows without attribution are returned as system. */+ readonly actor_kind: SignalActorKindEnumApi+ /**+ * MCP client name when an external agent produced the artefact.+ * @nullable+ */+ readonly actor_agent: string | null+ /** Authenticated user principal for user or external agent writes. Null for internal task and system writes. */+ readonly created_by: _UserApi | null+ /**+ * Internal task the artefact is attributed to. Null for user, external agent, and system writes.+ * @nullable+ */+ readonly task_id: string | null+}+/*** * `session_replay` - session_replay* * `llm_analytics` - llm_analytics@@ -4690,23 +4974,6 @@ export interface EditReportResponseApi {corroboration_collapsed: boolean}-/**- * * `P0` - P0- * * `P1` - P1- * * `P2` - P2- * * `P3` - P3- * * `P4` - P4- */-export type AutonomyPriorityEnumApi = (typeof AutonomyPriorityEnumApi)[keyof typeof AutonomyPriorityEnumApi]--export const AutonomyPriorityEnumApi = {- P0: 'P0',- P1: 'P1',- P2: 'P2',- P3: 'P3',- P4: 'P4',-} as const-/*** One finding a scout run emitted to the inbox — the persisted, queryable record of* *what* the run surfaced, returned by `scout-runs-emissions-list`. The emitted text@@ -5955,6 +6222,22 @@ export type SignalsReportChecksListParams = {offset?: number}+export type SignalsReportsAvailableReviewersRetrieveParams = {+ /**+ * Case-insensitive filter on name or email.+ */+ query?: string+}++export type SignalsReportsAvailableReviewersRetrieve200 = {+ [key: string]: {+ /** Member's full name. */+ name: string+ /** Member's email address. */+ email: string+ }+}+export type SignalsReportsPrCiStatusesParams = {/*** Comma-separated report UUIDs to resolve CI state for, at most 100 per request.diff --git a/products/signals/frontend/generated/api.ts b/products/signals/frontend/generated/api.tsindex 62b8e69d35d5..1e48058eff7f 100644--- a/products/signals/frontend/generated/api.ts+++ b/products/signals/frontend/generated/api.ts@@ -67,11 +67,13 @@ import type {SignalReportApi,SignalReportArtefactApi,SignalReportArtefactLogCreateApi,+ SignalReportArtefactWriteApi,SignalReportArtefactWriteResponseApi,SignalReportBulkStateRequestApi,SignalReportBulkStateResponseApi,SignalReportCheckApi,SignalReportClaimApi,+ SignalReportDeletionStatusApi,SignalReportFeedbackRequestApi,SignalReportFeedbackResponseApi,SignalReportMergeRequestApi,@@ -81,7 +83,9 @@ import type {SignalReportRefundRequestApi,SignalReportRefundResponseApi,SignalReportRefundSummaryResponseApi,+ SignalReportReingestionStatusApi,SignalReportStateRequestApi,+ SignalReportSuggestedReviewersArtefactApi,SignalScoutConfigApi,SignalScoutConfigCreateApi,SignalScoutCreateApi,@@ -92,6 +96,7 @@ import type {SignalScoutRunDetailApi,SignalScoutRunSummaryApi,SignalSourceConfigApi,+ SignalTeamConfigApi,SignalUserAutonomyConfigApi,SignalUserAutonomyConfigCreateApi,SignalsProcessingListParams,@@ -104,6 +109,8 @@ import type {SignalsReportPrReviewCommentReactionsCreateParams,SignalsReportPrReviewCommentUpdateParams,SignalsReportPrReviewCommentsCreateParams,+ SignalsReportsAvailableReviewersRetrieve200,+ SignalsReportsAvailableReviewersRetrieveParams,SignalsReportsListParams,SignalsReportsPrCiStatusesParams,SignalsScoutConfigListParams,@@ -138,6 +145,45 @@ type NonReadonly<T> = [T] extends [UnionToIntersection<T>]}: DistributeReadOnlyOverUnions<T>+export const getSignalsConfigListUrl = (projectId: string) => {+ return `/api/projects/${projectId}/signals/config/`+}++/**+ * Team-level signal autonomy config (singleton per team).+ *+ * GET /signals/config/ → retrieve+ * POST /signals/config/ → update+ * @summary Read the project's signals config+ */+export const signalsConfigList = async (projectId: string, options?: RequestInit): Promise<SignalTeamConfigApi> => {+ return apiMutator<SignalTeamConfigApi>(getSignalsConfigListUrl(projectId), {+ ...options,+ method: 'GET',+ })+}++export const getSignalsConfigCreateUrl = (projectId: string) => {+ return `/api/projects/${projectId}/signals/config/`+}++/**+ * Partial update of the per-project singleton. Omitted fields keep their value.+ * @summary Update the project's signals config+ */+export const signalsConfigCreate = async (+ projectId: string,+ signalTeamConfigApi?: NonReadonly<SignalTeamConfigApi>,+ options?: RequestInit+): Promise<SignalTeamConfigApi> => {+ return apiMutator<SignalTeamConfigApi>(getSignalsConfigCreateUrl(projectId), {+ ...options,+ method: 'POST',+ headers: { 'Content-Type': 'application/json', ...options?.headers },+ body: JSON.stringify(signalTeamConfigApi),+ })+}+export const getSignalsProcessingListUrl = (projectId: string, params?: SignalsProcessingListParams) => {const normalizedParams = new URLSearchParams()@@ -269,6 +315,25 @@ export const signalsReportsPartialUpdate = async (})}+export const getSignalsReportsDestroyUrl = (projectId: string, id: string) => {+ return `/api/projects/${projectId}/signals/reports/${id}/`+}++/**+ * Soft-delete a report and its signals via the deletion workflow.+ * @summary Delete a signal report+ */+export const signalsReportsDestroy = async (+ projectId: string,+ id: string,+ options?: RequestInit+): Promise<SignalReportDeletionStatusApi> => {+ return apiMutator<SignalReportDeletionStatusApi>(getSignalsReportsDestroyUrl(projectId, id), {+ ...options,+ method: 'DELETE',+ })+}+export const getSignalsReportsClaimUrl = (projectId: string, id: string) => {return `/api/projects/${projectId}/signals/reports/${id}/claim/`}@@ -632,6 +697,50 @@ export const signalsReportsRefundCreate = async (})}+export const getSignalsReportsReingestCreateUrl = (projectId: string, id: string) => {+ return `/api/projects/${projectId}/signals/reports/${id}/reingest/`+}++/**+ * Re-ingest a report's signals (same team access as other report actions).+ * @summary Re-ingest a report's signals+ */+export const signalsReportsReingestCreate = async (+ projectId: string,+ id: string,+ options?: RequestInit+): Promise<SignalReportReingestionStatusApi> => {+ return apiMutator<SignalReportReingestionStatusApi>(getSignalsReportsReingestCreateUrl(projectId, id), {+ ...options,+ method: 'POST',+ })+}++export const getSignalsReportsReviewersUpdateUrl = (projectId: string, id: string) => {+ return `/api/projects/${projectId}/signals/reports/${id}/reviewers/`+}++/**+ * Set a report's suggested reviewers (full-replacement PUT), whether or not the report already+ * has any. Appends a new latest-wins `suggested_reviewers` status row — the same write the artefact+ * PUT performs, but addressed by report so a report with zero reviewers (and thus no artefact yet)+ * can still be assigned one. App-only: agents append reviewers via the artefacts POST instead.+ * @summary Set a report's suggested reviewers+ */+export const signalsReportsReviewersUpdate = async (+ projectId: string,+ id: string,+ signalReportArtefactWriteApi: SignalReportArtefactWriteApi,+ options?: RequestInit+): Promise<SignalReportSuggestedReviewersArtefactApi> => {+ return apiMutator<SignalReportSuggestedReviewersArtefactApi>(getSignalsReportsReviewersUpdateUrl(projectId, id), {+ ...options,+ method: 'PUT',+ headers: { 'Content-Type': 'application/json', ...options?.headers },+ body: JSON.stringify(signalReportArtefactWriteApi),+ })+}+export const getSignalsReportsSignalsRetrieveUrl = (projectId: string, id: string) => {return `/api/projects/${projectId}/signals/reports/${id}/signals/`}@@ -942,6 +1051,42 @@ export const signalsReportChecksDestroy = async (})}+export const getSignalsReportsAvailableReviewersRetrieveUrl = (+ projectId: string,+ params?: SignalsReportsAvailableReviewersRetrieveParams+) => {+ 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/reports/available_reviewers/?${stringifiedParams}`+ : `/api/projects/${projectId}/signals/reports/available_reviewers/`+}++/**+ * @summary List the org members who can be suggested as reviewers+ */+export const signalsReportsAvailableReviewersRetrieve = async (+ projectId: string,+ params?: SignalsReportsAvailableReviewersRetrieveParams,+ options?: RequestInit+): Promise<SignalsReportsAvailableReviewersRetrieve200> => {+ return apiMutator<SignalsReportsAvailableReviewersRetrieve200>(+ getSignalsReportsAvailableReviewersRetrieveUrl(projectId, params),+ {+ ...options,+ method: 'GET',+ }+ )+}+export const getSignalsReportsBulkStateCreateUrl = (projectId: string) => {return `/api/projects/${projectId}/signals/reports/bulk-state/`}diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.tsindex e86637e772c3..542f3f68a8f9 100644--- a/products/signals/frontend/generated/api.zod.ts+++ b/products/signals/frontend/generated/api.zod.ts@@ -9,6 +9,91 @@*/import * as zod from 'zod'+/**+ * Partial update of the per-project singleton. Omitted fields keep their value.+ * @summary Update the project's signals config+ */+export const signalsConfigCreateBodyDefaultSlackNotificationChannelMax = 255++export const signalsConfigCreateBodyAutostartBaseBranchesMaxOne = 255++export const signalsConfigCreateBodyIssueTrackingConfigMaxOne = 255++export const signalsConfigCreateBodyMaxReportsPerDayMax = 2147483647++export const signalsConfigCreateBodyPullRequestLabelMax = 50++export const SignalsConfigCreateBody = /* @__PURE__ */ zod.object({+ autostart_enabled: zod+ .boolean()+ .nullish()+ .describe(+ 'Master switch for autonomous inbox PRs. Null (never set) leaves autostart on; set false to opt out, so actionable reports still generate and notify but the team never auto-starts an implementation task or opens a PR — reviewers open PRs manually.'+ ),+ default_autostart_priority: zod+ .enum(['P0', 'P1', 'P2', 'P3', 'P4'])+ .optional()+ .describe('\* `P0` - P0\n\* `P1` - P1\n\* `P2` - P2\n\* `P3` - P3\n\* `P4` - P4'),+ default_slack_notification_channel: zod+ .string()+ .max(signalsConfigCreateBodyDefaultSlackNotificationChannelMax)+ .nullish()+ .describe(+ "Default Slack channel for this team's signal inbox notifications, in the same `channel_id|#channel-name` shape PostHog uses elsewhere (only the channel id is required). Null means no team-level default; per-user channels still apply."+ ),+ autostart_base_branches: zod+ .record(zod.string(), zod.string().max(signalsConfigCreateBodyAutostartBaseBranchesMaxOne))+ .optional()+ .describe(+ "Per-repository base branch overrides for auto-started inbox PRs, keyed by 'organization\/repository'. The branch is what the auto-PR targets; omit a repo (or send {}) to keep targeting the repo default branch."+ ),+ issue_tracking_integration: zod+ .number()+ .nullish()+ .describe(+ 'Connected GitHub, GitLab, Linear, or Jira integration that self-driving opens a tracker issue in for each pull request it makes. Null turns tracker issues off, which is the default.'+ ),+ issue_tracking_config: zod+ .record(zod.string(), zod.string().max(signalsConfigCreateBodyIssueTrackingConfigMaxOne))+ .optional()+ .describe(+ "Where in the tracker the issues land. Required keys depend on the integration kind: github -> {repository}; linear -> {team_id}; jira -> {project_key}; gitlab needs none, because its integration is already bound to one project. An optional 'label' is applied to created GitHub issues."+ ),+ max_reports_per_day: zod+ .number()+ .min(1)+ .max(signalsConfigCreateBodyMaxReportsPerDayMax)+ .nullish()+ .describe(+ "Daily cap on new reports surfacing to the inbox, counted per calendar day in the project's timezone. Once reached, signal ingestion, scout runs, and report research pause until local midnight. Null means unlimited."+ ),+ default_open_pull_request_ready: zod+ .boolean()+ .optional()+ .describe(+ "Whether self-driving pull requests open ready for review instead of draft, so the full CI matrix starts when the pull request is created. False by default. A reviewer's own github_open_pull_request_ready overrides this for reports that suggest them as reviewer."+ ),+ github_issue_writeback_enabled: zod+ .boolean()+ .optional()+ .describe(+ "Whether self-driving comments back on a GitHub issue that raised a report, linking to the report so everybody watching the issue knows it is being researched. The comment is public on the issue thread and carries a link only, never report content. False by default. Needs a GitHub integration that can reach the issue's repository."+ ),+ pull_request_label_enabled: zod+ .boolean()+ .optional()+ .describe(+ 'Whether self-driving adds a label to every pull request it opens, so GitHub search, saved searches, and notification rules can separate them from other automation on the repository. False by default. Needs a GitHub integration that can reach the repository.'+ ),+ pull_request_label: zod+ .string()+ .max(signalsConfigCreateBodyPullRequestLabelMax)+ .nullish()+ .describe(+ "The label name self-driving applies, at most 50 characters. Null or blank means 'self-driving'. The label is created in the repository when it does not exist yet. Only used while pull_request_label_enabled is true."+ ),+})+/*** View and control signal processing pipeline state for a team.*/@@ -221,6 +306,66 @@ export const SignalsReportsRefundCreateBody = /* @__PURE__ */ zod.object({),})+/**+ * Set a report's suggested reviewers (full-replacement PUT), whether or not the report already+ * has any. Appends a new latest-wins `suggested_reviewers` status row — the same write the artefact+ * PUT performs, but addressed by report so a report with zero reviewers (and thus no artefact yet)+ * can still be assigned one. App-only: agents append reviewers via the artefacts POST instead.+ * @summary Set a report's suggested reviewers+ */+export const signalsReportsReviewersUpdateBodyContentItemGithubLoginMax = 200++export const signalsReportsReviewersUpdateBodyContentItemGithubNameMax = 200++export const signalsReportsReviewersUpdateBodyContentItemReasonMax = 500++export const signalsReportsReviewersUpdateBodyContentMax = 10++export const SignalsReportsReviewersUpdateBody = /* @__PURE__ */ zod+ .object({+ content: zod+ .array(+ zod+ .object({+ github_login: zod+ .string()+ .max(signalsReportsReviewersUpdateBodyContentItemGithubLoginMax)+ .optional()+ .describe(+ 'GitHub login (case-insensitive). Stored lowercased. Required unless `user_uuid` is given.'+ ),+ user_uuid: zod+ .uuid()+ .optional()+ .describe(+ "PostHog user UUID. Must be an org member on this team; a linked GitHub account is not required. Required unless `github_login` is given. If supplied together with `github_login`, the user's own identity wins."+ ),+ github_name: zod+ .string()+ .max(signalsReportsReviewersUpdateBodyContentItemGithubNameMax)+ .optional()+ .describe(+ 'Optional human-readable display name. Not backfilled from GitHub by the server.'+ ),+ reason: zod+ .string()+ .max(signalsReportsReviewersUpdateBodyContentItemReasonMax)+ .nullish()+ .describe(+ 'Optional short evidence for why this reviewer was chosen. Omitted entries keep the prior reason for reviewers already on the report.'+ ),+ })+ .describe(+ 'Single entry in a PUT body for a `suggested_reviewers` artefact.\n\nEach entry must identify a reviewer by at least one of `github_login` or `user_uuid`. A\n`user_uuid` only has to name an org member on this team — a member with no linked GitHub\naccount is stored by uuid and routes like any other reviewer.'+ )+ )+ .max(signalsReportsReviewersUpdateBodyContentMax)+ .describe('Full replacement list of reviewers. Empty list clears the artefact. At most 10 entries.'),+ })+ .describe(+ "PUT body for replacing a `suggested_reviewers` artefact's content.\n\nOnly `suggested_reviewers` artefacts may be modified via this endpoint;\nthe viewset enforces the type check before validation runs."+ )+/*** Transition a report to a new state. The model validates allowed transitions, except that a* verdict the report already holds (dismissing a suppressed report, resolving a resolved one)diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yamlindex 898384ec64e2..f212eaa5685e 100644--- a/products/signals/mcp/tools.yaml+++ b/products/signals/mcp/tools.yaml@@ -1162,6 +1162,12 @@ tools:`keys_only=true` to scan which memories exist without pulling their (potentially large) bodies, or`content_max_chars` to cap each `content` to a preview — both keep a wide orientation/dedupe scan fromreturning every entry's full prose. Results capped at 1000.+ signals-config-create:+ operation: signals_config_create+ enabled: false+ signals-config-list:+ operation: signals_config_list+ enabled: falsesignals-report-artefacts-diff:operation: signals_report_artefacts_diffenabled: false@@ -1189,6 +1195,12 @@ tools:signals-report-pr-review-comments-create:operation: signals_report_pr_review_comments_createenabled: false+ signals-reports-available-reviewers-retrieve:+ operation: signals_reports_available_reviewers_retrieve+ enabled: false+ signals-reports-destroy:+ operation: signals_reports_destroy+ enabled: falsesignals-reports-feedback-create:operation: signals_reports_feedback_createenabled: false@@ -1204,6 +1216,12 @@ tools:signals-reports-refund-summary-retrieve:operation: signals_reports_refund_summary_retrieveenabled: false+ signals-reports-reingest-create:+ operation: signals_reports_reingest_create+ enabled: false+ signals-reports-reviewers-update:+ operation: signals_reports_reviewers_update+ enabled: falsesignals-reports-signals-retrieve:operation: signals_reports_signals_retrieveenabled: falsediff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 3d1ad8f9ea4a..d24ee230b277 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -87415,6 +87415,48 @@ export namespace Schemas {content: unknown;}+ /**+ * Single entry in a PUT body for a `suggested_reviewers` artefact.+ *+ * Each entry must identify a reviewer by at least one of `github_login` or `user_uuid`. A+ * `user_uuid` only has to name an org member on this team — a member with no linked GitHub+ * account is stored by uuid and routes like any other reviewer.+ */+ export interface SuggestedReviewerEntryWrite {+ /**+ * GitHub login (case-insensitive). Stored lowercased. Required unless `user_uuid` is given.+ * @maxLength 200+ */+ github_login?: string;+ /** PostHog user UUID. Must be an org member on this team; a linked GitHub account is not required. Required unless `github_login` is given. If supplied together with `github_login`, the user's own identity wins. */+ user_uuid?: string;+ /**+ * Optional human-readable display name. Not backfilled from GitHub by the server.+ * @maxLength 200+ */+ github_name?: string;+ /**+ * Optional short evidence for why this reviewer was chosen. Omitted entries keep the prior reason for reviewers already on the report.+ * @maxLength 500+ * @nullable+ */+ reason?: string | null;+ }++ /**+ * PUT body for replacing a `suggested_reviewers` artefact's content.+ *+ * Only `suggested_reviewers` artefacts may be modified via this endpoint;+ * the viewset enforces the type check before validation runs.+ */+ export interface SignalReportArtefactWrite {+ /**+ * Full replacement list of reviewers. Empty list clears the artefact. At most 10 entries.+ * @maxItems 10+ */+ content: SuggestedReviewerEntryWrite[];+ }+/*** Response shape for the log-artefact create/update endpoints — echoes the stored row.*/@@ -87550,6 +87592,31 @@ export namespace Schemas {release?: boolean;}+ /**+ * * `deletion_started` - deletion_started+ * * `already_running` - already_running+ */+ export type SignalReportDeletionStatusStatusEnum = typeof SignalReportDeletionStatusStatusEnum[keyof typeof SignalReportDeletionStatusStatusEnum];+++ export const SignalReportDeletionStatusStatusEnum = {+ DeletionStarted: 'deletion_started',+ AlreadyRunning: 'already_running',+ } as const;++ /**+ * Envelope the report delete returns once it has kicked off the deletion workflow.+ */+ export interface SignalReportDeletionStatus {+ /** Whether this request started the deletion or found one already running.+ *+ * * `deletion_started` - deletion_started+ * * `already_running` - already_running */+ status: SignalReportDeletionStatusStatusEnum;+ /** Report being deleted. */+ report_id: string;+ }+export interface SignalReportFeedbackRequest {/** The rating left on the report: 'positive' (thumbs up) or 'negative' (thumbs down).*@@ -87683,6 +87750,31 @@ export namespace Schemas {quota_limited: boolean;}+ /**+ * * `reingestion_started` - reingestion_started+ * * `already_running` - already_running+ */+ export type SignalReportReingestionStatusStatusEnum = typeof SignalReportReingestionStatusStatusEnum[keyof typeof SignalReportReingestionStatusStatusEnum];+++ export const SignalReportReingestionStatusStatusEnum = {+ ReingestionStarted: 'reingestion_started',+ AlreadyRunning: 'already_running',+ } as const;++ /**+ * Envelope the reingest action returns once it has kicked off the re-ingestion workflow.+ */+ export interface SignalReportReingestionStatus {+ /** Whether this request started the re-ingestion or found one already running.+ *+ * * `reingestion_started` - reingestion_started+ * * `already_running` - already_running */+ status: SignalReportReingestionStatusStatusEnum;+ /** Report being re-ingested. */+ report_id: string;+ }+export interface SignalReportStateRequest {/** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is allowed from ready, pending_input, or failed, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.*@@ -87721,6 +87813,118 @@ export namespace Schemas {snooze_for?: number;}+ /**+ * * `suggested_reviewers` - suggested_reviewers+ */+ export type SignalReportSuggestedReviewersArtefactTypeEnum = typeof SignalReportSuggestedReviewersArtefactTypeEnum[keyof typeof SignalReportSuggestedReviewersArtefactTypeEnum];+++ export const SignalReportSuggestedReviewersArtefactTypeEnum = {+ SuggestedReviewers: 'suggested_reviewers',+ } as const;++ /**+ * Commit evidence behind a suggested reviewer.+ */+ export interface SuggestedReviewerCommit {+ /** Commit SHA. */+ sha: string;+ /** Link to the commit. */+ url: string;+ /** Why the commit makes this reviewer relevant. */+ reason: string;+ }++ /**+ * One reviewer as the read path returns it: the stored entry plus read-time enrichment.+ *+ * `source_label`, `explanation` and `user` are computed on read, not stored, so a caller cannot+ * write them.+ */+ export interface SuggestedReviewerEntryRead {+ /**+ * GitHub login, lowercased. Null when the reviewer has no linked account.+ * @nullable+ */+ github_login: string | null;+ /**+ * PostHog user this entry routes to. Null on entries written before reviewers had one.+ * @nullable+ */+ user_uuid: string | null;+ /**+ * Display name, when the writer supplied one.+ * @nullable+ */+ github_name: string | null;+ /** Commits attributed to this reviewer. Empty when the pick came from elsewhere. */+ relevant_commits: SuggestedReviewerCommit[];+ /**+ * Why this reviewer was chosen.+ * @nullable+ */+ reason: string | null;+ /** True when the scout owner guardrail added the entry rather than commit authorship. */+ is_skill_owner: boolean;+ /**+ * Scout skill whose run wrote the entry. Null when no scout did.+ * @nullable+ */+ source_skill: string | null;+ /** Where the suggestion came from, for display. */+ source_label: string;+ /**+ * One line of evidence for display. Null when there is none to show.+ * @nullable+ */+ explanation: string | null;+ /** Resolved org member. Null when the entry resolves to nobody. */+ user: _User | null;+ }++ /**+ * The artefact, for a path that only ever returns a `suggested_reviewers` one.+ *+ * `content` is polymorphic on the base serializer, so a generated client types it as unknown.+ * Here the type is fixed, so the entry shape can be declared. Runtime output is unchanged —+ * `get_content` delegates to the base.+ */+ export interface SignalReportSuggestedReviewersArtefact {+ /**+ * Work claim that produced this artefact.+ * @nullable+ */+ readonly claim_id: string | null;+ /**+ * Shared PR record linked by this artefact.+ * @nullable+ */+ readonly pull_request_id: string | null;+ readonly id: string;+ /** Always `suggested_reviewers` on this path.+ *+ * * `suggested_reviewers` - suggested_reviewers */+ readonly type: SignalReportSuggestedReviewersArtefactTypeEnum;+ readonly content: readonly SuggestedReviewerEntryRead[];+ readonly created_at: string;+ /** @nullable */+ readonly updated_at: string | null;+ /** Actor kind. Legacy rows without attribution are returned as system. */+ readonly actor_kind: SignalActorKindEnum;+ /**+ * MCP client name when an external agent produced the artefact.+ * @nullable+ */+ readonly actor_agent: string | null;+ /** Authenticated user principal for user or external agent writes. Null for internal task and system writes. */+ readonly created_by: _User | null;+ /**+ * Internal task the artefact is attributed to. Null for user, external agent, and system writes.+ * @nullable+ */+ readonly task_id: string | null;+ }+/*** Optional JSON Schema (draft 2020-12) describing ONE structured record this scout produces via `scout-record-output` — e.g. a per-report quality judgment (`{"type": "object", "properties": {"verdict": {"enum": ["good", "bad", "unsure"]}, "reason": {"type": "string"}}, "required": ["verdict", "reason"]}`). The root must be `"type": "object"`. Setting a schema turns the structured-output channel on: the run prompt renders the schema and every submitted record is validated against it and recorded in the project as a `$scout_structured_output` event, queryable like any event. The channel also requires emit — a dry-run scout has nowhere to record to. Cardinality is the scout's call (one record per run, one per judged entity, ...). Null = channel off. Setting a schema requires skill-authoring authorization (the `llm_skill:write` scope and skill editor access) since the scout reads it verbatim in its prompt; clearing it needs only the config write. Records validate against the schema in force when the run was dispatched.* @nullable@@ -88108,6 +88312,69 @@ export namespace Schemas {metadata: SignalScoutRunSummaryMetadata;}+ /**+ * Per-repository base branch overrides for auto-started inbox PRs, keyed by 'organization/repository'. The branch is what the auto-PR targets; omit a repo (or send {}) to keep targeting the repo default branch.+ */+ export type SignalTeamConfigAutostartBaseBranches = {[key: string]: string};++ /**+ * Where in the tracker the issues land. Required keys depend on the integration kind: github -> {repository}; linear -> {team_id}; jira -> {project_key}; gitlab needs none, because its integration is already bound to one project. An optional 'label' is applied to created GitHub issues.+ */+ export type SignalTeamConfigIssueTrackingConfig = {[key: string]: string};++ export interface SignalTeamConfig {+ readonly id: string;+ /**+ * Master switch for autonomous inbox PRs. Null (never set) leaves autostart on; set false to opt out, so actionable reports still generate and notify but the team never auto-starts an implementation task or opens a PR — reviewers open PRs manually.+ * @nullable+ */+ autostart_enabled?: boolean | null;+ default_autostart_priority?: AutonomyPriorityEnum;+ /**+ * Default Slack channel for this team's signal inbox notifications, in the same `channel_id|#channel-name` shape PostHog uses elsewhere (only the channel id is required). Null means no team-level default; per-user channels still apply.+ * @maxLength 255+ * @nullable+ */+ default_slack_notification_channel?: string | null;+ /** Per-repository base branch overrides for auto-started inbox PRs, keyed by 'organization/repository'. The branch is what the auto-PR targets; omit a repo (or send {}) to keep targeting the repo default branch. */+ autostart_base_branches?: SignalTeamConfigAutostartBaseBranches;+ /**+ * Connected GitHub, GitLab, Linear, or Jira integration that self-driving opens a tracker issue in for each pull request it makes. Null turns tracker issues off, which is the default.+ * @nullable+ */+ issue_tracking_integration?: number | null;+ /** Where in the tracker the issues land. Required keys depend on the integration kind: github -> {repository}; linear -> {team_id}; jira -> {project_key}; gitlab needs none, because its integration is already bound to one project. An optional 'label' is applied to created GitHub issues. */+ issue_tracking_config?: SignalTeamConfigIssueTrackingConfig;+ /**+ * Daily cap on new reports surfacing to the inbox, counted per calendar day in the project's timezone. Once reached, signal ingestion, scout runs, and report research pause until local midnight. Null means unlimited.+ * @minimum 1+ * @maximum 2147483647+ * @nullable+ */+ max_reports_per_day?: number | null;+ /** Whether self-driving pull requests open ready for review instead of draft, so the full CI matrix starts when the pull request is created. False by default. A reviewer's own github_open_pull_request_ready overrides this for reports that suggest them as reviewer. */+ default_open_pull_request_ready?: boolean;+ /** Whether self-driving comments back on a GitHub issue that raised a report, linking to the report so everybody watching the issue knows it is being researched. The comment is public on the issue thread and carries a link only, never report content. False by default. Needs a GitHub integration that can reach the issue's repository. */+ github_issue_writeback_enabled?: boolean;+ /** Whether self-driving adds a label to every pull request it opens, so GitHub search, saved searches, and notification rules can separate them from other automation on the repository. False by default. Needs a GitHub integration that can reach the repository. */+ pull_request_label_enabled?: boolean;+ /**+ * The label name self-driving applies, at most 50 characters. Null or blank means 'self-driving'. The label is created in the repository when it does not exist yet. Only used while pull_request_label_enabled is true.+ * @maxLength 50+ * @nullable+ */+ pull_request_label?: string | null;+ /**+ * How many reports first became visible in the inbox during the current project-timezone day. This is the count the daily report limit compares against.+ * @minimum 0+ */+ readonly reports_generated_today: number;+ /** Whether the team hit its daily report limit, pausing new report generation until local midnight. Always false when max_reports_per_day is null. */+ readonly daily_report_limit_reached: boolean;+ readonly created_at: string;+ readonly updated_at: string;+ }+export interface SignalUserAutonomyConfig {readonly id: string;readonly user: _User;@@ -112228,6 +112495,20 @@ export namespace Schemas {offset?: number;};+ export type SignalsReportsAvailableReviewersRetrieveParams = {+ /**+ * Case-insensitive filter on name or email.+ */+ query?: string;+ };++ export type SignalsReportsAvailableReviewersRetrieve200 = {[key: string]: {+ /** Member's full name. */+ name: string;+ /** Member's email address. */+ email: string;+ }};+export type SignalsReportsPrCiStatusesParams = {/*** Comma-separated report UUIDs to resolve CI state for, at most 100 per request.