Skip to content

: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.

feat(signals): require inbox scopes on inbox endpoints, tools and tables (#120672)

posthog[bot]234f410f213c
diff --git a/docs/internal/signals-pr-lifecycle.md b/docs/internal/signals-pr-lifecycle.md
index 512be5f281a4..1131128bfdb9 100644
--- a/docs/internal/signals-pr-lifecycle.md
+++ b/docs/internal/signals-pr-lifecycle.md
@@ -86,7 +86,7 @@ Research writes measurable outcome goals as `metric_threshold` report checks and
Reports awaiting human input retain their generated checks for a later Monitoring period. Outside Monitoring, open checks display as paused in the Follow-up checks sidebar. Expected impact retains proposed or approved measurement labels before Monitoring, and shows paused checks on resolved or archived reports, including when the rollout is disabled. Stored schedules do not advertise future runs or active scouts. Historical verdicts and legacy schedule fields remain readable; remaining-run counts authorize post-resolution execution only for flag-off agent checks. Metric replacements require access to the query they schedule and preserve the remaining recurring runs and soak duration, including zero minutes. Replacement cannot override the soak. Creation and replacement share full schedule validation against the 90-day horizon. A replacement rejects a check moved by a concurrent report merge; reload the report and retry on the survivor. Units cannot contain null characters or unpaired Unicode surrogates. The Expected impact section shows finished verdicts and refreshes after agent tasks change checks.
-The `inbox-report-checks-replace` MCP tool requires `task:write` and `query:read`. Query-specific event, action, and cohort permissions still apply. The `signals-report-checks-replace` rollout flag hides the tool unless enabled. Keep it disabled until the replacement API is deployed in every region. This gate is separate from the Expected impact display flag.
+The `inbox-report-checks-replace` MCP tool requires `inbox:write` and `query:read`. Query-specific event, action, and cohort permissions still apply. The `signals-report-checks-replace` rollout flag hides the tool unless enabled. Keep it disabled until the replacement API is deployed in every region. This gate is separate from the Expected impact display flag.
Approval advances the check's update timestamp so older list responses cannot undo it on screen. Retries preserve the original approval and timestamp. Research captures the open checks' versions before starting. If any check changes before its result is stored, that pass leaves the checks alone. A subsequent pass that sees the current checks can revise or retire them, including approved checks. Older activity results without this snapshot preserve person-selected and approved checks.
diff --git a/docs/published/handbook/engineering/ai/sandboxed-agents.md b/docs/published/handbook/engineering/ai/sandboxed-agents.md
index 450ef4a59252..e84a49807bd4 100644
--- a/docs/published/handbook/engineering/ai/sandboxed-agents.md
+++ b/docs/published/handbook/engineering/ai/sandboxed-agents.md
@@ -227,7 +227,7 @@ Available read scopes: `action:read`, `cohort:read`, `dashboard:read`, `error_tr
Available write scopes: `action:write`, `cohort:write`, `dashboard:write`,
`experiment:write`, `feature_flag:write`, `insight:write`, `survey:write`, and others.
-Internal scopes (`task:write`, `llm_gateway:read`) are always added automatically.
+Internal scopes (`task:write`, `inbox:write`, `llm_gateway:read`) are always added automatically.
An empty list (`posthog_mcp_scopes=[]`) omits the built-in PostHog MCP connection.
Internal credentials for task lifecycle and model calls remain available, including the local `task_summary_update` tool.
diff --git a/frontend/src/lib/agentScopes.generated.ts b/frontend/src/lib/agentScopes.generated.ts
index 21e23a3b06a0..1e62f1b44beb 100644
--- a/frontend/src/lib/agentScopes.generated.ts
+++ b/frontend/src/lib/agentScopes.generated.ts
@@ -77,6 +77,8 @@ export const AGENT_USE_CASE_SCOPES = [
'hog_flow:write',
'hog_function:read',
'hog_function:write',
+ 'inbox:read',
+ 'inbox:write',
'insight:read',
'insight:write',
'insight_variable:write',
diff --git a/frontend/src/lib/integrations/PosthogConnect.tsx b/frontend/src/lib/integrations/PosthogConnect.tsx
index 157dc6d3a470..80f297a1e098 100644
--- a/frontend/src/lib/integrations/PosthogConnect.tsx
+++ b/frontend/src/lib/integrations/PosthogConnect.tsx
@@ -37,7 +37,11 @@ const fullAccessScopes = (): string[] =>
GRANTABLE_SCOPES.map((s) => (s.disabledActions?.includes('write') ? `${s.key}:read` : `${s.key}:write`))
const SCOPE_PRESETS: { value: string; label: string; scopes: () => string[] }[] = [
- { value: 'tasks', label: 'Tasks only (read and write)', scopes: () => ['task:read', 'task:write'] },
+ {
+ value: 'tasks',
+ label: 'Tasks and inbox (read and write)',
+ scopes: () => ['task:read', 'task:write', 'inbox:read', 'inbox:write'],
+ },
{ value: 'read_only', label: 'Read-only (everything)', scopes: readAllScopes },
{ value: 'full', label: 'Full access', scopes: fullAccessScopes },
]
@@ -104,7 +108,7 @@ function PosthogConnectionRow({ integration }: { integration: IntegrationType })
function ConnectModal({ isOpen, onClose }: { isOpen: boolean; onClose: () => void }): JSX.Element {
const [region, setRegion] = useState<PosthogConnectRegion>('EU')
- const [scopes, setScopes] = useState<string[]>(['task:read', 'task:write'])
+ const [scopes, setScopes] = useState<string[]>(['task:read', 'task:write', 'inbox:read', 'inbox:write'])
const [searchTerm, setSearchTerm] = useState<string>('')
const scopeActions = useMemo(() => scopesArrayToObject(scopes), [scopes])
diff --git a/posthog/api/posthog_connection.py b/posthog/api/posthog_connection.py
index ab8de00a905d..6c6c01c8fe57 100644
--- a/posthog/api/posthog_connection.py
+++ b/posthog/api/posthog_connection.py
@@ -44,6 +44,7 @@ from posthog.models.integration import posthog_connect_base_url
from posthog.oauth_provenance import SANDBOX_ORIGIN_HEADER, is_sandbox_origin_request
from posthog.permissions import get_authenticator_scopes
from posthog.rate_limit import PostHogConnectionForwardThrottle
+from posthog.scopes import scopes_covered_by_legacy_fallback
logger = structlog.get_logger(__name__)
@@ -109,6 +110,8 @@ def _enforce_caller_covers_connection_scopes(request: Request, integration: Inte
"full-access API key or a session. Reconnect it to record its scopes."
)
missing = granted - set(caller_scopes)
+ # A legacy `task:*` key may use a connection granted the `inbox:*` scopes split off it, as the target accepts it.
+ missing -= set(scopes_covered_by_legacy_fallback(caller_scopes, missing))
if missing:
raise PermissionDenied(
"Your API key must carry the scopes this connection was granted to use it. "
diff --git a/posthog/api/test/test_posthog_connection.py b/posthog/api/test/test_posthog_connection.py
index 3255a4f57246..bf47f5379a9f 100644
--- a/posthog/api/test/test_posthog_connection.py
+++ b/posthog/api/test/test_posthog_connection.py
@@ -251,20 +251,34 @@ class TestPostHogConnectionForward:
assert response.status_code == status.HTTP_400_BAD_REQUEST
mock_request.assert_not_called()
- def test_forward_requires_caller_token_to_cover_connection_scopes(self, client: HttpClient):
- # A scoped key that lacks the scopes the connection was granted can't wield the connection.
- self.integration.config["granted_scopes"] = ["insight:read", "task:write"]
+ @pytest.mark.parametrize(
+ "granted_scopes,caller_scopes,forwarded",
+ [
+ (["insight:read", "task:write"], ["integration:write"], False),
+ (
+ ["task:read", "task:write", "inbox:read", "inbox:write"],
+ ["integration:write", "task:read", "task:write"],
+ True,
+ ),
+ (["task:read", "task:write", "inbox:read", "inbox:write"], ["integration:write", "inbox:write"], False),
+ ],
+ )
+ def test_forward_requires_caller_token_to_cover_connection_scopes(
+ self, client: HttpClient, granted_scopes: list[str], caller_scopes: list[str], forwarded: bool
+ ):
+ self.integration.config["granted_scopes"] = granted_scopes
self.integration.save()
client.force_login(self.user)
- with patch("posthog.api.posthog_connection.get_authenticator_scopes", return_value=["integration:write"]):
+ with patch("posthog.api.posthog_connection.get_authenticator_scopes", return_value=caller_scopes):
with patch(FORWARD_PATH) as mock_request:
+ mock_request.return_value = _mock_response(200, {"results": []})
response = client.post(
self._forward_url(),
{"method": "GET", "path": "api/projects/2/insights/"},
content_type="application/json",
)
- assert response.status_code == status.HTTP_403_FORBIDDEN
- mock_request.assert_not_called()
+ assert response.status_code == (status.HTTP_200_OK if forwarded else status.HTTP_403_FORBIDDEN)
+ assert mock_request.called == forwarded
def test_forward_refuses_scoped_caller_when_granted_scopes_unknown(self, client: HttpClient):
# If the target's token response omitted `scope`, `granted_scopes` is empty and we can't bound
diff --git a/posthog/auth.py b/posthog/auth.py
index d9edf52243a2..530cbbbfea33 100644
--- a/posthog/auth.py
+++ b/posthog/auth.py
@@ -65,6 +65,7 @@ from posthog.models.utils import (
from posthog.models.webauthn_credential import WebauthnCredential
from posthog.passkey import verify_passkey_authentication_response
from posthog.scoped_service_jwt import ScopedServiceJwtPurpose
+from posthog.scopes import LEGACY_SCOPE_FALLBACKS
from posthog.shared_link_user import SharedLinkUser
from posthog.synthetic_user import SyntheticUser
from posthog.utils import get_trusted_client_ip
@@ -515,7 +516,9 @@ class ProjectSecretAPIKeyUser(SyntheticUser):
self.project_secret_api_key = project_secret_api_key
def readable_system_table_access_scopes(self) -> set[str]:
- return {scope.split(":", 1)[0] for scope in self.project_secret_api_key.scopes or [] if ":" in scope}
+ scope_objects = {scope.split(":", 1)[0] for scope in self.project_secret_api_key.scopes or [] if ":" in scope}
+ # Same fallback as APIScopePermission, so a key that reads a split-off object's REST API also reads its tables.
+ return scope_objects | {new for new, legacy in LEGACY_SCOPE_FALLBACKS.items() if legacy in scope_objects}
class ProjectSecretAPIKeyAuthentication(ActivityCredentialMixin, authentication.BaseAuthentication):
diff --git a/posthog/hogql/database/schema/system.py b/posthog/hogql/database/schema/system.py
index 9ff43f5ce4c4..9d4c5b1434ab 100644
--- a/posthog/hogql/database/schema/system.py
+++ b/posthog/hogql/database/schema/system.py
@@ -2970,7 +2970,7 @@ usage_metrics: PostgresTable = PostgresTable(
inbox_report_artefacts: PostgresTable = PostgresTable(
name="inbox_report_artefacts",
postgres_table_name="signals_signalreportartefact",
- access_scope="task",
+ access_scope="inbox",
resource_level_access_only=True,
predicates=[
parse_expr("report_id IN (SELECT id FROM system.inbox_reports)"),
@@ -3019,7 +3019,7 @@ inbox_report_artefacts: PostgresTable = PostgresTable(
inbox_report_actions: PostgresTable = PostgresTable(
name="inbox_report_actions",
postgres_table_name="signals_signalreportaction",
- access_scope="task",
+ access_scope="inbox",
resource_level_access_only=True,
predicates=[
parse_expr("report_id IN (SELECT id FROM system.inbox_reports)"),
@@ -3051,7 +3051,7 @@ inbox_report_actions: PostgresTable = PostgresTable(
inbox_report_assignments: PostgresTable = PostgresTable(
name="inbox_report_assignments",
postgres_table_name="signals_signalreportassignment",
- access_scope="task",
+ access_scope="inbox",
resource_level_access_only=True,
predicates=[
parse_expr("report_id IN (SELECT id FROM system.inbox_reports)"),
@@ -3102,7 +3102,7 @@ inbox_report_assignments: PostgresTable = PostgresTable(
inbox_report_tasks: PostgresTable = PostgresTable(
name="inbox_report_tasks",
postgres_table_name="signals_signalreporttask",
- access_scope="task",
+ access_scope="inbox",
resource_level_access_only=True,
predicates=[
parse_expr("report_id IN (SELECT id FROM system.inbox_reports)"),
@@ -3130,7 +3130,7 @@ inbox_report_tasks: PostgresTable = PostgresTable(
inbox_report_pull_requests: PostgresTable = PostgresTable(
name="inbox_report_pull_requests",
postgres_table_name="signals_signalreportpullrequest",
- access_scope="task",
+ access_scope="inbox",
resource_level_access_only=True,
predicates=[
parse_expr("id IN (SELECT pull_request_id FROM system.inbox_report_artefacts)"),
@@ -3684,7 +3684,7 @@ canvases: PostgresTable = PostgresTable(
inbox_reports: PostgresTable = PostgresTable(
name="inbox_reports",
postgres_table_name="signals_signalreport",
- access_scope="task",
+ access_scope="inbox",
# Object-level task grants key task ids, never report ids, so they cannot narrow these rows.
resource_level_access_only=True,
predicates=[parse_expr("status != 'deleted'")],
@@ -3760,7 +3760,7 @@ inbox_reports: PostgresTable = PostgresTable(
inbox_report_checks: PostgresTable = PostgresTable(
name="inbox_report_checks",
postgres_table_name="signals_signalreportcheck",
- access_scope="task",
+ access_scope="inbox",
resource_level_access_only=True,
predicates=[parse_expr("report_id IN (SELECT id FROM system.inbox_reports)")],
description=(
diff --git a/posthog/hogql/database/schema/test/test_system_tables.py b/posthog/hogql/database/schema/test/test_system_tables.py
index 7752b5d50759..b3fe8e0c95c1 100644
--- a/posthog/hogql/database/schema/test/test_system_tables.py
+++ b/posthog/hogql/database/schema/test/test_system_tables.py
@@ -11,7 +11,7 @@ from django.utils import timezone
from parameterized import parameterized
from posthog.hogql.context import HogQLContext
-from posthog.hogql.database.database import Database
+from posthog.hogql.database.database import Database, _compute_system_table_access_decision, system_table_denials
from posthog.hogql.database.models import Table
from posthog.hogql.database.schema.system import SystemTables
from posthog.hogql.errors import QueryError
@@ -19,6 +19,7 @@ from posthog.hogql.parser import parse_select
from posthog.hogql.printer import prepare_and_print_ast
from posthog.hogql.query import execute_hogql_query
+from posthog.auth import ProjectSecretAPIKeyUser
from posthog.constants import AvailableFeature
from posthog.models import (
DataDeletionRequest,
@@ -34,12 +35,14 @@ from posthog.models import (
from posthog.models.activity_logging.activity_log import ActivityLog
from posthog.models.data_deletion_request import ExecutionMode, RequestStatus, RequestType
from posthog.models.project import Project
+from posthog.models.project_secret_api_key import ProjectSecretAPIKey
from posthog.models.scoping import team_scope
from posthog.models.team.team_revenue_analytics_config import TeamRevenueAnalyticsConfig
from posthog.persons_db import persons_db_connection
from posthog.persons_seed import insert_seed_group, insert_seed_group_type_mapping
from products.access_control.backend.facade.contracts import PropertyAccessLevel
+from products.access_control.backend.models.access_control import AccessControl
from products.access_control.backend.models.property_access_control import PropertyAccessControl
from products.access_control.backend.models.role import Role
from products.actions.backend.models.action import Action
@@ -1504,6 +1507,45 @@ class TestSystemTablesTaskInternalExclusionIsolation(NonAtomicBaseTest):
assert str(internal_task.pk) not in ids
+class TestSystemTablesInboxAccess(BaseTest):
+ @parameterized.expand(
+ [
+ ("inbox_read", ["inbox:read"], True),
+ ("legacy_task_read", ["task:read"], True),
+ ("unrelated", ["insight:read"], False),
+ ]
+ )
+ def test_project_secret_api_key_inbox_system_table_visibility(
+ self, _name: str, scopes: list[str], expected_visible: bool
+ ) -> None:
+ psak = ProjectSecretAPIKey.objects.create(
+ team=self.team, label="inbox-tables", secure_value="sha256$" + "e" * 64, scopes=scopes
+ )
+
+ _, denied = _compute_system_table_access_decision(self.team, ProjectSecretAPIKeyUser(psak))
+
+ assert ("inbox_reports" not in denied) is expected_visible
+ assert ("tasks" not in denied) is (scopes == ["task:read"])
+
+ @parameterized.expand([("default_access", None, False), ("task_access_none", "none", True)])
+ def test_member_reads_inbox_system_tables_like_task_tables(
+ self, _name: str, task_access_level: str | None, expected_denied: bool
+ ) -> None:
+ self.organization.available_product_features = [
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL}
+ ]
+ self.organization.save()
+ self.organization_membership.level = OrganizationMembership.Level.MEMBER
+ self.organization_membership.save()
+ if task_access_level is not None:
+ AccessControl.objects.create(team=self.team, resource="task", access_level=task_access_level)
+
+ denied = system_table_denials(self.team, self.user)
+
+ assert ("tasks" in denied) is expected_denied
+ assert ("inbox_reports" in denied) is expected_denied
+
+
class TestSystemTablesInboxDeletedExclusionIsolation(NonAtomicBaseTest):
CLASS_DATA_LEVEL_SETUP = False
diff --git a/posthog/hogql/database/test/test_postgres_table.py b/posthog/hogql/database/test/test_postgres_table.py
index ea5b4148bd34..8c4d756b271e 100644
--- a/posthog/hogql/database/test/test_postgres_table.py
+++ b/posthog/hogql/database/test/test_postgres_table.py
@@ -640,9 +640,14 @@ class TestSystemTableAccessScope(SimpleTestCase):
access_scope = _SCOPED_SYSTEM_TABLES[table_name].access_scope
# A pure umbrella is a parent in the inheritance map that is never itself a
- # `scope_object` — so object grants can only ever live on its children, not on it.
+ # `scope_object`, while a child is — so object grants live on its children, not on it.
+ # A parent whose children store no object grants either (`task` for `inbox`) has none to miss.
grant_scopes = _object_grant_scopes()
- pure_umbrellas = {parent for parent in RESOURCE_INHERITANCE_MAP.values() if parent not in grant_scopes}
+ pure_umbrellas = {
+ parent
+ for child, parent in RESOURCE_INHERITANCE_MAP.items()
+ if parent not in grant_scopes and child in grant_scopes
+ }
if access_scope in pure_umbrellas:
children = sorted(child for child, parent in RESOURCE_INHERITANCE_MAP.items() if parent == access_scope)
diff --git a/posthog/models/integration/oauth.py b/posthog/models/integration/oauth.py
index e611f25b05f7..e9c8b6456318 100644
--- a/posthog/models/integration/oauth.py
+++ b/posthog/models/integration/oauth.py
@@ -331,7 +331,7 @@ _POSTHOG_CONNECT_ALLOW_DEV = bool(settings.DEBUG or settings.TEST or settings.E2
POSTHOG_CONNECT_ALLOWED_REGIONS = ("US", "EU", *(("DEV",) if _POSTHOG_CONNECT_ALLOW_DEV else ()))
-POSTHOG_CONNECT_DEFAULT_SCOPES = ("task:read", "task:write")
+POSTHOG_CONNECT_DEFAULT_SCOPES = ("task:read", "task:write", "inbox:read", "inbox:write")
POSTHOG_CONNECT_IDENTITY_SCOPES = ("openid", "email")
diff --git a/posthog/permissions.py b/posthog/permissions.py
index 008d13bd6b43..cc6568cda9e3 100644
--- a/posthog/permissions.py
+++ b/posthog/permissions.py
@@ -845,12 +845,14 @@ def get_authenticator_scoped_team_ids(authenticator) -> list[int] | None:
LEGACY_SCOPE_FALLBACK_EVENT_INTERVAL_SECONDS = 60 * 60
-def _capture_legacy_scope_fallback(request: Request, view: APIView, required_scope: str, legacy_scope: str) -> None:
+def _capture_legacy_scope_fallback(
+ request: Request, view: APIView | None, required_scope: str, legacy_scope: str
+) -> None:
"""Record that a legacy scope satisfied a required scope. The events show which credentials and
OAuth apps still depend on the legacy scope, so the entry in LEGACY_SCOPE_FALLBACKS can go."""
client = get_authenticator_client(request.successful_authenticator)
distinct_id = str(getattr(request.user, "distinct_id", None) or client["client_id"])
- view_name = type(view).__name__
+ view_name = type(view).__name__ if view is not None else "unknown"
# At most one event per caller, client, scope and view each interval, because this runs on every request.
throttle_key = f"legacy_scope_fallback:{distinct_id}:{client['client_id']}:{required_scope}:{view_name}"
if not cache.add(throttle_key, True, timeout=LEGACY_SCOPE_FALLBACK_EVENT_INTERVAL_SECONDS):
@@ -868,6 +870,21 @@ def _capture_legacy_scope_fallback(request: Request, view: APIView, required_sco
)
+def scopes_missing_after_legacy_fallback(
+ request: Request, view: APIView | None, held_scopes: list[str], required_scopes: list[str]
+) -> list[str]:
+ """The required scopes that the held scopes do not cover, after LEGACY_SCOPE_FALLBACKS. When none
+ are missing, records each fallback use, so a hand-written scope check feeds the same migration
+ telemetry as APIScopePermission."""
+ missing_scopes = scopes_not_covered(held_scopes, required_scopes)
+ legacy_covered = scopes_covered_by_legacy_fallback(held_scopes, missing_scopes)
+ missing_scopes = [scope for scope in missing_scopes if scope not in legacy_covered]
+ if not missing_scopes:
+ for required_scope, legacy_scope in legacy_covered.items():
+ _capture_legacy_scope_fallback(request, view, required_scope, legacy_scope)
+ return missing_scopes
+
+
class APIScopePermission(ScopeBasePermission):
"""
The request is via an API key or OAuth token and the user has the appropriate scopes.
@@ -949,16 +966,11 @@ class APIScopePermission(ScopeBasePermission):
if "*" in key_scopes and scope_object != "INTERNAL" and not action_targets_internal:
return True
- missing_scopes = scopes_not_covered(key_scopes, required_scopes)
- legacy_covered = scopes_covered_by_legacy_fallback(key_scopes, missing_scopes)
- missing_scopes = [scope for scope in missing_scopes if scope not in legacy_covered]
+ missing_scopes = scopes_missing_after_legacy_fallback(request, view, key_scopes, required_scopes)
if missing_scopes:
self.message = f"API key missing required scope '{missing_scopes[0]}'"
return False
- for required_scope, legacy_scope in legacy_covered.items():
- _capture_legacy_scope_fallback(request, view, required_scope, legacy_scope)
-
return True
def _sandbox_tool_policy_allows(
diff --git a/products/access_control/backend/facade/user_access_control.py b/products/access_control/backend/facade/user_access_control.py
index acf5e9028062..ae778b2f5e1c 100644
--- a/products/access_control/backend/facade/user_access_control.py
+++ b/products/access_control/backend/facade/user_access_control.py
@@ -126,6 +126,9 @@ RESOURCE_INHERITANCE_MAP: dict[APIScopeObject, APIScopeObject] = {
# Vision alerts are configured via the scanner's access level rather than a
# separate resource.
"vision_alert": "replay_scanner",
+ # The inbox API scope split off `task`, but access control still governs the inbox through the
+ # `task` rules, so a member restricted on tasks stays restricted on the inbox.
+ "inbox": "task",
}
# Every scope a rule write accepts: the project, the resource types with resource-level rules,
diff --git a/products/access_control/frontend/generated/api.schemas.ts b/products/access_control/frontend/generated/api.schemas.ts
index 8033d106c750..0ecbe05a72c9 100644
--- a/products/access_control/frontend/generated/api.schemas.ts
+++ b/products/access_control/frontend/generated/api.schemas.ts
@@ -659,6 +659,7 @@ export interface AccessControlPropertyRulesResponseApi {
* * `feature_flag` - feature_flag
* * `heatmap` - heatmap
* * `hog_flow` - hog_flow
+ * * `inbox` - inbox
* * `insight` - insight
* * `llm_analytics` - llm_analytics
* * `llm_playground` - llm_playground
@@ -717,6 +718,7 @@ export const RuleResourceEnumApi = {
FeatureFlag: 'feature_flag',
Heatmap: 'heatmap',
HogFlow: 'hog_flow',
+ Inbox: 'inbox',
Insight: 'insight',
LlmAnalytics: 'llm_analytics',
LlmPlayground: 'llm_playground',
@@ -780,6 +782,7 @@ export interface AccessControlRuleRequestApi {
* * `feature_flag` - feature_flag
* * `heatmap` - heatmap
* * `hog_flow` - hog_flow
+ * * `inbox` - inbox
* * `insight` - insight
* * `llm_analytics` - llm_analytics
* * `llm_playground` - llm_playground
@@ -1060,6 +1063,7 @@ export interface AccessControlMemberRuleRequestApi {
* * `feature_flag` - feature_flag
* * `heatmap` - heatmap
* * `hog_flow` - hog_flow
+ * * `inbox` - inbox
* * `insight` - insight
* * `llm_analytics` - llm_analytics
* * `llm_playground` - llm_playground
@@ -1372,6 +1376,7 @@ export interface AccessControlRoleRuleRequestApi {
* * `feature_flag` - feature_flag
* * `heatmap` - heatmap
* * `hog_flow` - hog_flow
+ * * `inbox` - inbox
* * `insight` - insight
* * `llm_analytics` - llm_analytics
* * `llm_playground` - llm_playground
diff --git a/products/access_control/frontend/generated/api.zod.ts b/products/access_control/frontend/generated/api.zod.ts
index d2db56a29126..8a19aafdf5ae 100644
--- a/products/access_control/frontend/generated/api.zod.ts
+++ b/products/access_control/frontend/generated/api.zod.ts
@@ -41,6 +41,7 @@ export const OrganizationsProjectsAccessControlDefaultRulesUpdateBody = /* @__PU
'feature_flag',
'heatmap',
'hog_flow',
+ 'inbox',
'insight',
'llm_analytics',
'llm_playground',
@@ -72,10 +73,10 @@ export const OrganizationsProjectsAccessControlDefaultRulesUpdateBody = /* @__PU
'web_analytics',
])
.describe(
- '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
)
.describe(
- 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
),
resource_id: zod
.string()
@@ -137,6 +138,7 @@ export const OrganizationsProjectsAccessControlMemberRulesUpdateBody = /* @__PUR
'feature_flag',
'heatmap',
'hog_flow',
+ 'inbox',
'insight',
'llm_analytics',
'llm_playground',
@@ -168,10 +170,10 @@ export const OrganizationsProjectsAccessControlMemberRulesUpdateBody = /* @__PUR
'web_analytics',
])
.describe(
- '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
)
.describe(
- 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
),
resource_id: zod
.string()
@@ -223,6 +225,7 @@ export const OrganizationsProjectsAccessControlRoleRulesUpdateBody = /* @__PURE_
'feature_flag',
'heatmap',
'hog_flow',
+ 'inbox',
'insight',
'llm_analytics',
'llm_playground',
@@ -254,10 +257,10 @@ export const OrganizationsProjectsAccessControlRoleRulesUpdateBody = /* @__PURE_
'web_analytics',
])
.describe(
- '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
)
.describe(
- 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
),
resource_id: zod
.string()
diff --git a/products/replay_vision/backend/api/observations.py b/products/replay_vision/backend/api/observations.py
index 357051deddf7..c5e62f63e886 100644
--- a/products/replay_vision/backend/api/observations.py
+++ b/products/replay_vision/backend/api/observations.py
@@ -1298,7 +1298,7 @@ class ReplayObservationViewSet(
methods=["get"],
url_path="signal_reports",
pagination_class=None,
- required_scopes=["replay_scanner:read", "session_recording:read", "task:read"],
+ required_scopes=["replay_scanner:read", "session_recording:read", "inbox:read"],
)
def signal_reports(self, request: Request, **kwargs: Any) -> Response:
"""The inbox reports this observation's emitted signals were grouped into, newest first."""
diff --git a/products/replay_vision/backend/api/scanners.py b/products/replay_vision/backend/api/scanners.py
index 35953d62ec65..1890c9f56608 100644
--- a/products/replay_vision/backend/api/scanners.py
+++ b/products/replay_vision/backend/api/scanners.py
@@ -3087,7 +3087,7 @@ class ReplayScannerViewSet(TeamAndOrgViewSetMixin, AccessControlViewSetMixin, vi
detail=True,
methods=["get"],
url_path="self_driving_stats",
- required_scopes=["replay_scanner:read", "task:read"],
+ required_scopes=["replay_scanner:read", "inbox:read"],
)
def self_driving_stats(self, request: Request, **kwargs: Any) -> Response:
"""What self-driving did with this scanner's signals: reports contributed to and PRs opened."""
diff --git a/products/replay_vision/backend/api/scout_reports.py b/products/replay_vision/backend/api/scout_reports.py
index 326e1178eba4..0360190be1a6 100644
--- a/products/replay_vision/backend/api/scout_reports.py
+++ b/products/replay_vision/backend/api/scout_reports.py
@@ -59,9 +59,9 @@ class ScannerScoutReportViewSet(TeamAndOrgViewSetMixin, viewsets.ViewSet):
# Appended to the standard stack by `TeamAndOrgViewSetMixin.get_permissions`.
permission_classes = [ScoutDataAccessPermission]
scope_object = "replay_scanner"
- # `task` is the scope object Signals gates its own report reads on, so a token that cannot read
+ # `inbox` is the scope object Signals gates its own report reads on, so a token that cannot read
# reports there cannot read them through a scanner either.
- required_scopes = ["replay_scanner:read", "session_recording:read", "task:read"]
+ required_scopes = ["replay_scanner:read", "session_recording:read", "inbox:read"]
serializer_class = ScoutReportSerializer
# A scanner's roster is small, and this backs a list a person reads.
diff --git a/products/replay_vision/mcp/tools.yaml b/products/replay_vision/mcp/tools.yaml
index 739358183bed..b42f1f47f784 100644
--- a/products/replay_vision/mcp/tools.yaml
+++ b/products/replay_vision/mcp/tools.yaml
@@ -362,7 +362,7 @@ tools:
scopes:
- replay_scanner:read
- session_recording:read
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -969,7 +969,7 @@ tools:
scopes:
- replay_scanner:read
- session_recording:read
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -984,7 +984,7 @@ tools:
scopes:
- replay_scanner:read
- session_recording:read
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -1049,7 +1049,7 @@ tools:
enabled: true
scopes:
- replay_scanner:read
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
diff --git a/products/signals/ARCHITECTURE.md b/products/signals/ARCHITECTURE.md
index d5336b9f1c58..536807919ed7 100644
--- a/products/signals/ARCHITECTURE.md
+++ b/products/signals/ARCHITECTURE.md
@@ -550,7 +550,7 @@ A failed verdict on a resolved report is the one outcome nobody would otherwise
Five best-effort events in `report_check_telemetry.py` follow a check: `signals_report_check_skipped` for a research spec dropped before it was stored; `signals_report_check_created` from the shared write, so every author is counted; `signals_report_check_dispatch` for each attempt to hand an `agent` check to a run, with the refusing gate as `reason` on a deferral; `signals_report_check_evaluated` for each verdict, where a `check_status` of `active` means the check looks again; and `signals_report_checks_expired`, one per project per sweep, whose `never_ran_count` is the checks that were written and never looked at.
-Checks are written in one place, `report_check_authoring.create_check`, which owns the per-report cap, the metric-query copy, and the attribution for every caller. Only two authors write a check: a scout run, and the research pipeline. `SignalReportCheckViewSet` (`/signals/reports/:id/checks/`) is read and cancel only, and the public MCP surface is `inbox-report-checks-list` / `-retrieve`. There is deliberately no caller-facing create: an `agent` check puts its author's prose in front of a privileged scout run, which `task:write` does not authorize, and every other surface that does so demands `llm_skill:write` plus skill-editor access. Scouts create and cancel through the scout tools `scout-report-check-create` / `-list` / `-cancel` (gated on the report-channel `allowed_tools` opt-in and the `signal_scout_report:write` scope, the two layers `scout-emit-report` already sits behind, because a check is a write on a report). Research writes its specs in `mark_report_ready_activity`. The scout tools also bind to the run the caller's sandbox token was minted for, so a run cannot write, list or cancel under a sibling's task, and a write goes through the same emit preflight as a signal or a report, so a dry-run scout writes no check. There is no update: editing a threshold after a result would make the recorded verdict unreadable.
+Checks are written in one place, `report_check_authoring.create_check`, which owns the per-report cap, the metric-query copy, and the attribution for every caller. Only two authors write a check: a scout run, and the research pipeline. `SignalReportCheckViewSet` (`/signals/reports/:id/checks/`) is read and cancel only, and the public MCP surface is `inbox-report-checks-list` / `-retrieve`. There is deliberately no caller-facing create: an `agent` check puts its author's prose in front of a privileged scout run, which `inbox:write` does not authorize, and every other surface that does so demands `llm_skill:write` plus skill-editor access. Scouts create and cancel through the scout tools `scout-report-check-create` / `-list` / `-cancel` (gated on the report-channel `allowed_tools` opt-in and the `signal_scout_report:write` scope, the two layers `scout-emit-report` already sits behind, because a check is a write on a report). Research writes its specs in `mark_report_ready_activity`. The scout tools also bind to the run the caller's sandbox token was minted for, so a run cannot write, list or cancel under a sibling's task, and a write goes through the same emit preflight as a signal or a report, so a dry-run scout writes no check. There is no update: editing a threshold after a result would make the recorded verdict unreadable.
Research authors its checks in the verification turn (`FixVerificationOutput.checks`, a list of `CheckSpec`). The turn is offered the `metric_threshold` kind only while the report-metrics rollout is on, because such a check references one of the report's own metrics by `metric_id`, and the `agent` kind only while the team is enrolled in scouts and has a lane that can run it, because nothing would ever run a check with no scout behind it. When only the metric kind is on, the prompt says so. `create_checks_from_specs` drops an `agent` spec that still has no lane, keeps the others, and fires `signals_report_check_skipped`. The daily run budget is not part of that gate: a research check stays pending until its report resolves, and the dispatcher defers a throttled check by itself. With neither, the `checks` field never reaches the schema. The specs are persisted by `mark_report_ready_activity`, in the same transaction that writes the title, summary, charts and metrics, so a spec naming a metric that transition did not store is dropped there rather than kept pointing at nothing. Only a pass that settles writes its specs: a pass that loops back to `candidate` is about to be replaced, and its checks would be armed later against prose they were not written for. For the same reason a settled pass that returns specs cancels the report's earlier `pending` checks first, which only research writes. A pass that returns none leaves them alone, because the verification turn is best-effort. The plan and the check read as one thing in the timeline: the prose is the plan, and `to_note()` names the check it scheduled.
@@ -568,7 +568,7 @@ Agentic research writes metrics atomically with the matching title, summary, and
**Attribution.** Every write helper (`append_status` / `add_log` / `append_finding` / `append_dismissal`) requires an `ArtefactAttribution` — exactly one of `from_user(user_id)` / `from_task(task_id)` / `system()` — so no write site can silently skip it. Agent writes are attributed deterministically: sandbox provisioning bakes the agent's task id into an `X-PostHog-Task-Id` header on its MCP config, forwarded by the MCP server on every API call; the LLM never handles its own task id. The header is attribution metadata, not an authorization boundary (the token is team-scoped and the named task must belong to the same team).
-**Write surface.** `SignalReportArtefactViewSet` exposes POST / PATCH / DELETE for any type (a status write appends a new latest-wins row), the bespoke `suggested_reviewers` PUT, and a `diff` action that renders a `commit` artefact's branch against the repository default branch via `GitHubIntegration.get_diff` (GitHub compare API, validated repo/ref/sha). All gated by `scope_object = "task"` (`task:write`). Custom agents queue artefacts during a run via `CustomSignalAgent.register_artefact`, persisted in the report's transaction and attributed to the agent's task — except `commit` (written automatically by the signed-commit harness) and `task_run` (written by report persistence), which never need registering there.
+**Write surface.** `SignalReportArtefactViewSet` exposes POST / PATCH / DELETE for any type (a status write appends a new latest-wins row), the bespoke `suggested_reviewers` PUT, and a `diff` action that renders a `commit` artefact's branch against the repository default branch via `GitHubIntegration.get_diff` (GitHub compare API, validated repo/ref/sha). All gated by `scope_object = "inbox"` (`inbox:write`). Custom agents queue artefacts during a run via `CustomSignalAgent.register_artefact`, persisted in the report's transaction and attributed to the agent's task — except `commit` (written automatically by the signed-commit harness) and `task_run` (written by report persistence), which never need registering there.
Claim content stores a server-generated `display_name`: a phase label for internal agents, or the user name plus external client (for example, "Alex's Codex").
Unknown clients use "Alex's agent". The label is fixed at claim time and does not participate in ownership checks; older claims can omit it.
@@ -1043,7 +1043,7 @@ Read + delete + state transitions. Uses `IsAuthenticated` + `APIScopePermission`
| DELETE | `signals/reports/{id}/` | Soft-delete a report and its signals. Starts `SignalReportDeletionWorkflow`. On success returns `202`. If the workflow is already running, returns `200 {"status": "already_running"}`. The API immediately transitions the Postgres report to `deleted` to hide it from list results while ClickHouse cleanup runs asynchronously. |
| POST | `signals/reports/{id}/state/` | Transition report state. Body: `{ "state": "suppressed" \| "potential" \| "resolved", ...transition_to kwargs }`. `suppressed`, `potential`, and `resolved` are exposed via API (`resolved` for user-driven "work is done"; the model still gates which statuses may resolve). Returns `409` on invalid transitions and `400` on invalid arguments. |
| POST | `signals/reports/{id}/merge/` | Merge duplicate reports into this one. Body: `{ "source_report_ids": [...], "reason": "..." }`. One transaction moves the sources' signals, log artefacts, pull requests, task runs and checks onto the survivor, then archives each source with reason `merged` and a `duplicate_of` link back. See `report_merge.py`. |
-| POST | `signals/reports/{id}/reingest/` | Delete a report and re-ingest its signals. Starts `SignalReportReingestionWorkflow`. On success returns `202`. If already running, returns `200 {"status": "already_running"}`. Same team access as other report endpoints; personal API keys need `task:write`. |
+| POST | `signals/reports/{id}/reingest/` | Delete a report and re-ingest its signals. Starts `SignalReportReingestionWorkflow`. On success returns `202`. If already running, returns `200 {"status": "already_running"}`. Same team access as other report endpoints; personal API keys need `inbox:write`. |
| GET | `signals/reports/{id}/artefacts/` | List **all** artefacts for a report, ordered by `-created_at` |
| GET | `signals/reports/{id}/signals/` | Fetch all signals for a report from ClickHouse, including full metadata |
| GET | `signals/reports/available_reviewers/` | List available suggested reviewers for the team |
diff --git a/products/signals/backend/presentation/inbox_summary.py b/products/signals/backend/presentation/inbox_summary.py
index 78200b5bb77a..8a69a0650016 100644
--- a/products/signals/backend/presentation/inbox_summary.py
+++ b/products/signals/backend/presentation/inbox_summary.py
@@ -51,7 +51,7 @@ class InboxSummaryViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
serializer_class = InboxSummarySerializer
authentication_classes = [SessionAuthentication, PersonalAPIKeyAuthentication, OAuthAccessTokenAuthentication]
permission_classes = [IsAuthenticated, APIScopePermission]
- scope_object = "task"
+ scope_object = "inbox"
requires_resource_level_access = True
pagination_class = None
diff --git a/products/signals/backend/presentation/onboarding.py b/products/signals/backend/presentation/onboarding.py
index 1605f770c4ad..80736a4229fe 100644
--- a/products/signals/backend/presentation/onboarding.py
+++ b/products/signals/backend/presentation/onboarding.py
@@ -18,6 +18,7 @@ from posthog.auth import OAuthAccessTokenAuthentication, PersonalAPIKeyAuthentic
from posthog.models.user import User
from posthog.oauth_provenance import is_sandbox_oauth_request
from posthog.permissions import APIScopePermission, get_authenticator_scopes
+from posthog.scopes import scopes_not_covered
from products.access_control.backend.facade.user_access_control import UserAccessControl
from products.signals.backend.facade.onboarding import (
@@ -35,6 +36,16 @@ from products.signals.backend.presentation.scout_permissions import ScoutCanonic
from products.signals.backend.presentation.scout_suggestion_serializers import ScoutSuggestionItemSerializer
+def credential_may_start_tasks(request: Request) -> bool:
+ """Whether the request's credential may start a task run, as `task:write` allows.
+
+ For a write whose scope depends on the request body. Session auth has no scopes, so team
+ membership and access control gate it instead.
+ """
+ scopes = get_authenticator_scopes(getattr(request, "successful_authenticator", None))
+ return scopes is None or "*" in scopes or not scopes_not_covered(scopes, ["task:write"])
+
+
class InboxOnboardingStep(models.TextChoices):
SIGNALS = "signals", "Signals"
SCOUTS = "scouts", "Scouts"
@@ -166,13 +177,13 @@ class InboxOnboardingPermission(BasePermission):
class InboxOnboardingViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
authentication_classes = [SessionAuthentication, PersonalAPIKeyAuthentication, OAuthAccessTokenAuthentication]
permission_classes = [IsAuthenticated, APIScopePermission, InboxOnboardingPermission]
- scope_object = "task"
+ scope_object = "inbox"
requires_resource_level_access = True
serializer_class = InboxOnboardingStateSerializer
pagination_class = None
def dangerously_get_required_scopes(self, request: Request, view: object) -> list[str]:
- return ["task:read"] if request.method in ("GET", "HEAD", "OPTIONS") else ["task:write"]
+ return ["inbox:read"] if request.method in ("GET", "HEAD", "OPTIONS") else ["inbox:write"]
def _check_scout_access(self, request: Request) -> None:
permission = ScoutCanonicalTeamAccessPermission()
@@ -229,6 +240,8 @@ class InboxOnboardingViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
serializer.is_valid(raise_exception=True)
if any(source["source_product"] == "signals_scout" for source in serializer.validated_data["sources"]):
self._check_scout_access(request)
+ if serializer.validated_data["automatic_implementation"] and not credential_may_start_tasks(request):
+ raise PermissionDenied("Turning on automatic implementation requires the task:write scope.")
try:
return Response(self._service().complete(dict(serializer.data)))
except InboxOnboardingPermissionError as error:
diff --git a/products/signals/backend/presentation/reviewer_exclusions.py b/products/signals/backend/presentation/reviewer_exclusions.py
index 080cfce63745..15f25c52ea46 100644
--- a/products/signals/backend/presentation/reviewer_exclusions.py
+++ b/products/signals/backend/presentation/reviewer_exclusions.py
@@ -160,7 +160,7 @@ class SignalReviewerExclusionViewSet(TeamAndOrgViewSetMixin, viewsets.GenericVie
serializer_class = ReviewerExclusionSerializer
authentication_classes = [SessionAuthentication, PersonalAPIKeyAuthentication, OAuthAccessTokenAuthentication]
permission_classes = [IsAuthenticated, APIScopePermission, ScoutCanonicalTeamAccessPermission]
- scope_object = "task"
+ scope_object = "inbox"
pagination_class = None
def _exclusion_id(self) -> UUID:
@@ -300,7 +300,7 @@ class SignalReviewerExclusionViewSet(TeamAndOrgViewSetMixin, viewsets.GenericVie
request=None,
responses={200: ReviewerExclusionSerializer},
)
- @action(detail=True, methods=["post"], url_path="revoke", required_scopes=["task:write"])
+ @action(detail=True, methods=["post"], url_path="revoke", required_scopes=["inbox:write"])
def revoke(self, request: Request, *args: Any, **kwargs: Any) -> Response:
try:
revoked = revoke_own_exclusion(
diff --git a/products/signals/backend/scout_harness/AGENTS.md b/products/signals/backend/scout_harness/AGENTS.md
index 3cf75f2cb699..d09f88927f6f 100644
--- a/products/signals/backend/scout_harness/AGENTS.md
+++ b/products/signals/backend/scout_harness/AGENTS.md
@@ -80,7 +80,7 @@ In production it is driven by `SignalsScoutCoordinatorWorkflow` (periodic tick e
`run_id` on a `remember` write is best-effort lineage, never a gate: the serializer coerces one it can't parse to `None` (`_BestEffortUUIDField`, the same stance `expires_at` takes) and the view drops one that names no run on this project, because a scout retypes the id out of its run prompt and a truncated copy must not cost the memory. When nothing usable comes off the body the view falls back to `tools/runs.run_id_for_sandbox_task`, which resolves the writing run from the task the caller's sandbox token is bound to — provenance the sandbox cannot choose, so lineage survives the typo. Non-sandbox callers and the pipeline stages resolve to no run and are unaffected. A best-effort field must also present as a plain string in the OpenAPI schema — `_BestEffortDateTimeField` carries `@extend_schema_field(OpenApiTypes.STR)`, and codegen strips the `uuid` format for `_BestEffortUUIDField`. A `format` keyword makes the generated MCP client refuse the value before the request leaves the caller, so the tolerance never runs and the write is lost anyway.
The scratchpad is shared with the report pipeline, not scout-only. `remember` / `forget` are gated on their own `signal_scratchpad_internal:write` scope rather than the wider `signal_scout_internal:write`, so the pipeline's research and implementation runs can persist what they judged without also getting `emit_signal` and `record_output`. Scouts keep both tools, because `SCOUT_INTERNAL_SCOPES` carries the scratchpad scope too; the pipeline's own postures are the `signals_research` / `signals_implementation` presets in `posthog/temporal/oauth.py`. `signals_research` withholds `task:write`: it turns the MCP read-only header off so its scratchpad tools survive, and that header was the only thing keeping the task-write toolset (report state included) away from a stage meant to read.
Those stages have no `SignalScoutRun`, so `created_by_run` cannot name them. They stamp `SignalScratchpad.created_by_identity` instead — a `pipeline:*` string from `../pipeline_identity.py`, resolved server-side from the token's bound task (its `ai_stage`, written once at run creation) rather than passed in, since a writer that could name itself could name a scout's skill. `_to_entry` reads it as `created_by_skill` when there is no run, so `scout-scratchpad-search` attributes every entry the same way. Like `created_by_run` it is written on create only, so an upsert keeps the original author.
- - `notes.py` — `list_notes` / `leave_note` / `delete_note` backed by the `SignalScoutNote` model: steering notes humans (or other agents) leave for the fleet over the public MCP surface (`scout-notes-*` tools), the inbound counterpart to the scratchpad. A note targets one scout by `skill_name` or the whole fleet (blank), optionally expiring via `expires_at`; the run prompt's _Notes left for you_ section directs every scout to `scout-notes-list` its own notes in step 1 and treat them as advisory steering. A third audience is a stage of the report pipeline, addressed through the reserved `pipeline:*` family (`PIPELINE_AUDIENCES`, holding `pipeline:report-research` today): a pseudo-target riding the same `skill_name` column, allowlisted at write time so an unrecognized one is rejected instead of silently steering no one, and skipping the scout-skill lookup because a stage has no `LLMSkill` row. `list_notes` matches `skill_name` exactly, so no scout ever sees a pipeline note; the research loader in `../report_steering.py` pastes the `pipeline:report-research` notes and tells the run to search the rest with `text`. `validate_note_target`, the shared write-time rule, and the audience constants live in `../note_targets.py`, an import-light module, because the Django admin form calls the rule at registry load and importing anything under `tools/` runs that package's `__init__`, which pulls in every harness tool. Unlike the scratchpad there is no sandbox-only write gate, but writes still demand skill-authoring-level authorization (keys need `llm_skill:write` on top of `signal_scout:write`, and every writer must clear the `llm_skill` RBAC editor bar) — so a note-writer could already steer the fleet by editing its skills, and notes add no new steering power. Four more writers derive rows from inbox activity. `../dismissal_notes.py`: judging an inbox report with a note (dismiss, snooze, or restore) also leaves it here as an `origin=report_dismissal` note, targeted at the scout that authored the report, so a reviewer's verdict reaches the scout without it having to re-find the report. Resolving does not, since that says the report did its job rather than that filing it was wrong. `../discussion_notes.py`: opening a discussion on a report (the inbox "Discuss" action, which kicks off a Q&A task) also leaves the user's question here as an `origin=report_discussion` note, targeted at the authoring scout — framed as context to weigh or ignore, not a verdict, so the scout can fold a durable preference/correction into its scratchpad or dismiss it as noise. `../feedback_notes.py`: the thumbs rating at the end of a report body ("Was this report useful?") carries its optional note here as an `origin=report_feedback` note, targeted at the authoring scout. Unlike a dismissal it never falls back to a fleet-wide note — feedback is a verdict on one scout's own report, so with no resolvable authoring scout nothing is forwarded and the call is a no-op — and it never changes the report's state; the analytics event the client fires stays the durable record of the rating. `../reviewer_correction_notes.py`: a user-attributed reviewer edit that changes the set (adding or removing a suggested reviewer) also leaves an `origin=report_reviewer_correction` note, and it is the only derived origin addressed to more than one scout — every live scout that emitted or edited the report (`resolve_touching_scout_skills`, since an editing scout may be the one that put the reviewers there) plus every scout whose `reviewer:` memory names a removed GitHub login or PostHog user UUID (`_memory_holders`, one exact-term search under the `reviewer:` key prefix), ordered emitting scout first and capped at `MAX_NOTE_TARGETS`, so a scout still routing on a stale login hears about the correction. A report no live scout touched falls back to the fleet-wide blank dismissals use, but only when no holder resolved, since a run reads the fleet-wide notes alongside its own and a holder would hear the same edit twice. An impersonated edit forwards nothing, matching the reviewer-corrections project profile, which excludes impersonated activity rows for the same reason. GitHub logins and user UUIDs are shape-checked before rendering and capped per edit (`MAX_CORRECTION_REVIEWERS`), because both write paths into the reviewers artefact accept any string of any length and the value lands in a backtick span every scout reads. Repeat delivery coalesces only for the same report, target, and latest action inside `SUPPRESSION_WINDOW`. Corrections on other reports and reversals remain separate evidence. Scouts search related notes without a `skill_name` filter before selection, so feedback can cross producers. Self-removal alone does not establish a standing exclusion. Like a dismissal it may fall back fleet-wide, and unlike discuss/feedback it does not demand the `signal_scout:write` / `llm_skill:write` key scopes, because the logins already reach scouts through the report's reviewers artefact and the project profile. All four paths re-check the same steering gate (token `scoped_teams`, canonical-project access, and the `llm_skill` editor bar) since the dismiss, discuss, feedback, and reviewer-edit actions need only `task:write`, and all forward only on the canonical team. The discuss and feedback paths additionally demand the `signal_scout:write` / `llm_skill:write` key scopes: a dismissal's text reaches runs anyway through the reports API, whereas the note is the only path a discussion question or feedback note takes to a scout, so a `task:write` credential must not open it alone. The discuss path is triggered from the tasks viewset (which holds the request the gate reads) through `facade/api.py:forward_report_discussion_note`, never from the tasks facade. On the read side, every derived origin quotes report content (report id, title, the note text), so `SignalScoutNoteViewSet.list` withholds them from any caller failing the reports read gate (`_may_read_reports`); both that gate and `../report_steering.py` read the list off `SignalScoutNote.derived_origins()` rather than naming the kinds, so a newly added origin is withheld from the moment it exists. The derived rows are context with a TTL; the `dismissal` artefact / discussion task / feedback analytics event / reviewer `suggested_reviewers` artefact + `suggested_reviewers_changed` activity-log row stays the record of truth. Notes reach two surfaces outside the fleet, both through `../report_steering.py`. `load_report_steering` puts no note text into the description of the self-driving implementation task; it renders a short nudge that tells the run to pull notes (`scout-notes-list`) and fleet memory (`scout-scratchpad-search`) itself, because the report author already read the notes and most of them do not apply to a code change. `load_research_steering` pastes only the `pipeline:report-research` audience into the report-research prompt and nudges the run to search every other origin by entity (`list_notes` `text`), because the derived ones are feedback on exactly the judgment that stage is about to make; that run is read-only, already holds the report's raw signals, and writes back only to the report on the same team.
+ - `notes.py` — `list_notes` / `leave_note` / `delete_note` backed by the `SignalScoutNote` model: steering notes humans (or other agents) leave for the fleet over the public MCP surface (`scout-notes-*` tools), the inbound counterpart to the scratchpad. A note targets one scout by `skill_name` or the whole fleet (blank), optionally expiring via `expires_at`; the run prompt's _Notes left for you_ section directs every scout to `scout-notes-list` its own notes in step 1 and treat them as advisory steering. A third audience is a stage of the report pipeline, addressed through the reserved `pipeline:*` family (`PIPELINE_AUDIENCES`, holding `pipeline:report-research` today): a pseudo-target riding the same `skill_name` column, allowlisted at write time so an unrecognized one is rejected instead of silently steering no one, and skipping the scout-skill lookup because a stage has no `LLMSkill` row. `list_notes` matches `skill_name` exactly, so no scout ever sees a pipeline note; the research loader in `../report_steering.py` pastes the `pipeline:report-research` notes and tells the run to search the rest with `text`. `validate_note_target`, the shared write-time rule, and the audience constants live in `../note_targets.py`, an import-light module, because the Django admin form calls the rule at registry load and importing anything under `tools/` runs that package's `__init__`, which pulls in every harness tool. Unlike the scratchpad there is no sandbox-only write gate, but writes still demand skill-authoring-level authorization (keys need `llm_skill:write` on top of `signal_scout:write`, and every writer must clear the `llm_skill` RBAC editor bar) — so a note-writer could already steer the fleet by editing its skills, and notes add no new steering power. Four more writers derive rows from inbox activity. `../dismissal_notes.py`: judging an inbox report with a note (dismiss, snooze, or restore) also leaves it here as an `origin=report_dismissal` note, targeted at the scout that authored the report, so a reviewer's verdict reaches the scout without it having to re-find the report. Resolving does not, since that says the report did its job rather than that filing it was wrong. `../discussion_notes.py`: opening a discussion on a report (the inbox "Discuss" action, which kicks off a Q&A task) also leaves the user's question here as an `origin=report_discussion` note, targeted at the authoring scout — framed as context to weigh or ignore, not a verdict, so the scout can fold a durable preference/correction into its scratchpad or dismiss it as noise. `../feedback_notes.py`: the thumbs rating at the end of a report body ("Was this report useful?") carries its optional note here as an `origin=report_feedback` note, targeted at the authoring scout. Unlike a dismissal it never falls back to a fleet-wide note — feedback is a verdict on one scout's own report, so with no resolvable authoring scout nothing is forwarded and the call is a no-op — and it never changes the report's state; the analytics event the client fires stays the durable record of the rating. `../reviewer_correction_notes.py`: a user-attributed reviewer edit that changes the set (adding or removing a suggested reviewer) also leaves an `origin=report_reviewer_correction` note, and it is the only derived origin addressed to more than one scout — every live scout that emitted or edited the report (`resolve_touching_scout_skills`, since an editing scout may be the one that put the reviewers there) plus every scout whose `reviewer:` memory names a removed GitHub login or PostHog user UUID (`_memory_holders`, one exact-term search under the `reviewer:` key prefix), ordered emitting scout first and capped at `MAX_NOTE_TARGETS`, so a scout still routing on a stale login hears about the correction. A report no live scout touched falls back to the fleet-wide blank dismissals use, but only when no holder resolved, since a run reads the fleet-wide notes alongside its own and a holder would hear the same edit twice. An impersonated edit forwards nothing, matching the reviewer-corrections project profile, which excludes impersonated activity rows for the same reason. GitHub logins and user UUIDs are shape-checked before rendering and capped per edit (`MAX_CORRECTION_REVIEWERS`), because both write paths into the reviewers artefact accept any string of any length and the value lands in a backtick span every scout reads. Repeat delivery coalesces only for the same report, target, and latest action inside `SUPPRESSION_WINDOW`. Corrections on other reports and reversals remain separate evidence. Scouts search related notes without a `skill_name` filter before selection, so feedback can cross producers. Self-removal alone does not establish a standing exclusion. Like a dismissal it may fall back fleet-wide, and unlike discuss/feedback it does not demand the `signal_scout:write` / `llm_skill:write` key scopes, because the logins already reach scouts through the report's reviewers artefact and the project profile. All four paths re-check the same steering gate (token `scoped_teams`, canonical-project access, and the `llm_skill` editor bar) since the dismiss, discuss, feedback, and reviewer-edit actions need only `inbox:write`, and all forward only on the canonical team. The discuss and feedback paths additionally demand the `signal_scout:write` / `llm_skill:write` key scopes: a dismissal's text reaches runs anyway through the reports API, whereas the note is the only path a discussion question or feedback note takes to a scout, so an `inbox:write` credential must not open it alone. The discuss path is triggered from the tasks viewset (which holds the request the gate reads) through `facade/api.py:forward_report_discussion_note`, never from the tasks facade. On the read side, every derived origin quotes report content (report id, title, the note text), so `SignalScoutNoteViewSet.list` withholds them from any caller failing the reports read gate (`_may_read_reports`); both that gate and `../report_steering.py` read the list off `SignalScoutNote.derived_origins()` rather than naming the kinds, so a newly added origin is withheld from the moment it exists. The derived rows are context with a TTL; the `dismissal` artefact / discussion task / feedback analytics event / reviewer `suggested_reviewers` artefact + `suggested_reviewers_changed` activity-log row stays the record of truth. Notes reach two surfaces outside the fleet, both through `../report_steering.py`. `load_report_steering` puts no note text into the description of the self-driving implementation task; it renders a short nudge that tells the run to pull notes (`scout-notes-list`) and fleet memory (`scout-scratchpad-search`) itself, because the report author already read the notes and most of them do not apply to a code change. `load_research_steering` pastes only the `pipeline:report-research` audience into the report-research prompt and nudges the run to search every other origin by entity (`list_notes` `text`), because the derived ones are feedback on exactly the judgment that stage is about to make; that run is read-only, already holds the report's raw signals, and writes back only to the report on the same team.
- `structured_output.py` — `record_structured_output` (+ `_sync`): the structured-output channel, next to signals and reports. Opt-in via `SignalScoutConfig.structured_output_schema` (a JSON Schema describing ONE record, validated at config-write time by `validate_structured_output_schema` — which also rejects non-local `$ref`/`$dynamicRef`, and every validator here uses a no-retrieval registry, so a user-controlled schema can never make the worker fetch a URL; null = channel off, and the record endpoint fails closed). Setting the schema is skill-authoring-level steering (schema `description` fields are free prose rendered verbatim into a privileged prompt), so the config viewset gates it behind `llm_skill:write` + the `llm_skill` editor bar, like scout notes; clearing it stays on the base config scope. Records validate against the dispatch-time schema snapshot the runner stamps on the run row (`metadata["structured_output_schema"]`), so a mid-run schema edit can't reject records matching what the run was shown — while clearing the config schema mid-run still fails the channel closed (re-checked inside the capacity-reservation transaction with the config row locked, so a clear racing a submit serializes cleanly). Each submitted record is validated against the schema (all-or-nothing per call — an invalid record fails the batch with nothing written) and written into the team's own project as a `$scout_structured_output` event via one `capture_batch_internal` call (person processing off, deterministic uuid over `(run, batch index, subject, payload)` so a resubmitted batch collapses at ingestion while in-batch duplicates stay distinct). The events ARE the record — there is no Postgres row store, so past records are read like any events (insights, HogQL) and retention follows event retention — which is also why a delivery failure fails the call (`StructuredOutputDeliveryError` → 503) with an instruction to retry — the events carry a stable timestamp (the run's `created_at`) alongside the deterministic uuid, so the dedupe sorting key (`toDate(timestamp)` is part of it) stays identical across retries even past UTC midnight — and why the channel fails loudly for a dry-run `emit=False` scout, an org without AI-processing consent (mirroring `emit._preflight_emit_gates`), or a disabled `signals_scout` source instead of suppressing quietly (the runner also withholds the prompt section and schema snapshot when `emit` is off). Cardinality is the scout's call — the schema describes one record; a run may submit one, one per judged entity, or a batch (caps: `MAX_RECORDS_PER_CALL` per call, `MAX_RECORDS_PER_RUN` per run via the `structured_output_count` counter on `run.metadata`, reserved under the run-row lock before the forward — it counts accepted batches, so failed or retried forwards still spend cap). The prompt renders the exact configured schema in a per-run `# Structured output` section only when the channel is live, so the prompt and the validator can never describe two different contracts.
- `checks.py` — `record_check_result`: the only way a scout run closes the report check it was dispatched to answer (`agent`-kind `SignalReportCheck`, dispatched by `../report_check_agent.py` with `triggered_by="check"`). The verdict goes through the check executor's own funnel (`../report_check_execution.record_check_verdict`), so an agent result advances or retires its check by the same rules a measured one does, and lands on the report as a `check_result` artefact attributed to the run's task. Binding is what keeps the tool narrow: it admits only a check whose resolved lane is this run's own skill and that is still waiting on a dispatch (`dispatched_at` set), so the widest thing a run can do is answer the question it was asked. Deliberately NOT gated on `allowed_tools` like the report channel — the dispatch binding is the gate, so the fallback lane needs no frontmatter change to answer a check. It takes `inconclusive` with a required `reason` for a run whose tools worked but whose evidence cannot settle the claim, so `errored` stays a real tool or model failure. The prompt tells a run to record `passed` or `failed` when the evidence meets the check's stated bar. A run that never calls it leaves the check stamped, and the coordinator records an errored result once the result window passes.
The same module holds the authoring tools — `create_report_check` / `list_report_checks` / `cancel_report_check`, exposed as `scout-report-check-create` / `-list` / `-cancel` — which are the other direction: a run that surfaces something whose fix will show in data writes the re-measurement down instead of leaving a note for a future run to find. They write through `../report_check_authoring.create_check`, the one place a check row is written, so a scout-written check obeys the same per-report cap, the same metric-query copy, and the same bounds as one written through the REST endpoint, and is attributed to the run's task like every other scout write. Unlike `record_check_result` these ARE gated on the report channel (`signal_scout_report:write` plus the `edit_report` `allowed_tools` opt-in, through `_resolve_in_progress_run`), because a check is a write on a report rather than an answer to a question the coordinator already asked. Their actions resolve the run through `_resolve_own_in_progress_run`, which also refuses a sandbox token minted for a different run, and create and cancel pass `_preflight_emit_gates` first, so a dry-run scout writes no check.
diff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.py
index 9790a99fd8d6..d7a69470c618 100644
--- a/products/signals/backend/scout_harness/serializers.py
+++ b/products/signals/backend/scout_harness/serializers.py
@@ -30,7 +30,7 @@ from posthog.api.shared import UserBasicSerializer
from posthog.event_usage import groups
from posthog.models.team.team import Team
from posthog.models.user import User
-from posthog.permissions import get_authenticator_scopes
+from posthog.permissions import get_authenticator_scopes, scopes_missing_after_legacy_fallback
from posthog.slack.formatting import channel_id_from_target
from posthog.temporal.oauth import SCOUT_DEFAULT_WRITE_SCOPES, SCOUT_GRANTABLE_WRITE_SCOPES
@@ -3032,10 +3032,10 @@ def _validate_output_destinations(value: dict, context: dict) -> dict:
if not any(scope in key_scopes for scope in ("integration:read", "integration:write")):
raise PermissionDenied("API key missing required scope 'integration:read'")
# Delivery pushes report titles/summaries to the channel — content the report API gates
- # behind `task` scope — so a scoped key without it must not be able to route that content
+ # behind `inbox` scope — so a scoped key without it must not be able to route that content
# out via a destination.
- if not any(scope in key_scopes for scope in ("task:read", "task:write")):
- raise PermissionDenied("API key missing required scope 'task:read'")
+ if scopes_missing_after_legacy_fallback(request, context.get("view"), key_scopes, ["inbox:read"]):
+ raise PermissionDenied("API key missing required scope 'inbox:read'")
return {"slack": slack, **({"webhook": webhook} if webhook else {}), **inbox}
diff --git a/products/signals/backend/scout_harness/views.py b/products/signals/backend/scout_harness/views.py
index 766da32b289a..5d6c8be08d43 100644
--- a/products/signals/backend/scout_harness/views.py
+++ b/products/signals/backend/scout_harness/views.py
@@ -42,6 +42,7 @@ from rest_framework.decorators import action
from rest_framework.permissions import IsAuthenticated
from rest_framework.request import Request
from rest_framework.response import Response
+from rest_framework.views import APIView
from temporalio.exceptions import WorkflowAlreadyStartedError
from posthog.api.mixins import ValidatedRequest, validated_request
@@ -58,7 +59,12 @@ from posthog.dataclasses import frozen
from posthog.models.organization import OrganizationMembership
from posthog.models.team.team import Team
from posthog.models.user import User
-from posthog.permissions import AccessControlPermission, APIScopePermission, get_authenticator_scopes
+from posthog.permissions import (
+ AccessControlPermission,
+ APIScopePermission,
+ get_authenticator_scopes,
+ scopes_missing_after_legacy_fallback,
+)
from posthog.rate_limit import (
AIBurstRateThrottle,
AISustainedRateThrottle,
@@ -367,15 +373,15 @@ def _sandbox_bound_task_id(request: Request) -> uuid.UUID | None:
return authenticator.access_token.sandbox_task_id
-def _may_read_reports(request: Request, canonical_team: Team) -> bool:
+def _may_read_reports(request: Request, view: APIView, canonical_team: Team) -> bool:
"""Whether this caller could read the inbox reports a `report_dismissal` note quotes.
Those notes carry a report's id, title, and the reviewer's dismissal text, all of which the
- reports API gates on the `task` scope object. The notes surface rides `signal_scout` instead,
+ reports API gates on the `inbox` scope object. The notes surface rides `signal_scout` instead,
so both of that API's legs are re-checked here or a caller reads report content it cannot
- reach canonically. Mirrors the `signal_scout:read` + `task:read` pair on `emission_reports`.
+ reach canonically. Mirrors the `signal_scout:read` + `inbox:read` pair on `emission_reports`.
- Both legs matter independently. A token carries API scopes, and one without task read is
+ Both legs matter independently. A token carries API scopes, and one without inbox read is
refused. Every caller, token or session, must also clear the `task` RBAC bar on the canonical
team, because an admin can grant a member scout access while withholding task access, and a
session caller carries no scopes for the first leg to inspect.
@@ -385,8 +391,9 @@ def _may_read_reports(request: Request, canonical_team: Team) -> bool:
scopes, which reads as "session caller" and skips the first leg entirely.
"""
scopes = get_authenticator_scopes(request.successful_authenticator)
- if scopes is not None and not ("*" in scopes or "task:read" in scopes or "task:write" in scopes):
- return False
+ if scopes is not None and "*" not in scopes:
+ if scopes_missing_after_legacy_fallback(request, view, scopes, ["inbox:read"]):
+ return False
user = request.user
if not isinstance(user, User):
@@ -635,7 +642,7 @@ class SignalScoutRunViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
def get_serializer_context(self) -> dict[str, object]:
context = super().get_serializer_context()
- context["may_read_reports"] = _may_read_reports(self.request, self.team.parent_team or self.team)
+ context["may_read_reports"] = _may_read_reports(self.request, self, self.team.parent_team or self.team)
return context
def initial(self, request: Request, *args: object, **kwargs: object) -> None:
@@ -994,10 +1001,10 @@ class SignalScoutRunViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
detail=True,
methods=["get"],
url_path="emissions/reports",
- # This action returns report titles, so it requires `task:read` (the scope
+ # This action returns report titles, so it requires `inbox:read` (the scope
# `SignalReportViewSet` gates report reads on) on top of `signal_scout:read` —
# otherwise a scout-only token could read titles it can't reach canonically.
- required_scopes=["signal_scout:read", "task:read"],
+ required_scopes=["signal_scout:read", "inbox:read"],
pagination_class=None,
)
def emission_reports(self, request: Request, **kwargs) -> Response:
@@ -1075,9 +1082,9 @@ class SignalScoutRunViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
detail=False,
methods=["post"],
url_path="emissions/reports/batch",
- # Returns report titles, so it requires `task:read` on top of `signal_scout:read` — same as the
+ # Returns report titles, so it requires `inbox:read` on top of `signal_scout:read` — same as the
# per-run `emission_reports` action; a scout-only token must not read titles it can't reach.
- required_scopes=["signal_scout:read", "task:read"],
+ required_scopes=["signal_scout:read", "inbox:read"],
pagination_class=None,
)
def emission_reports_batch(self, request: Request, **kwargs) -> Response:
@@ -2244,7 +2251,7 @@ class SignalScoutNoteViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
text=validated.get("text") or None,
exclude_origins=(
()
- if _may_read_reports(request, self.team.parent_team or self.team)
+ if _may_read_reports(request, self, self.team.parent_team or self.team)
# Every derived origin quotes report content (id, title, and the reviewer's / user's
# text), so a caller without report read access must not see any of them.
else SignalScoutNote.derived_origins()
@@ -3076,7 +3083,7 @@ def assert_can_grant_scout_write_scopes(
user = cast(User, request.user)
token_scopes = get_authenticator_scopes(request.successful_authenticator)
if token_scopes is not None and "*" not in token_scopes:
- missing = sorted(added_scopes - set(token_scopes))
+ missing = scopes_missing_after_legacy_fallback(request, None, token_scopes, sorted(added_scopes))
if missing:
raise exceptions.PermissionDenied(
f"This API key does not carry {', '.join(missing)}, so it cannot grant that access to a scout."
diff --git a/products/signals/backend/test/test_inbox_onboarding.py b/products/signals/backend/test/test_inbox_onboarding.py
index f7fed36f4706..c2b9ce0933b6 100644
--- a/products/signals/backend/test/test_inbox_onboarding.py
+++ b/products/signals/backend/test/test_inbox_onboarding.py
@@ -396,6 +396,38 @@ class TestInboxOnboarding(APIBaseTest):
assert safe_detail is not None
assert next(change for change in safe_detail["changes"] if change["field"] == "onboarding")["after"] == "masked"
+ @parameterized.expand(
+ [
+ ("inbox_only_with_implementation", ["inbox:write"], True, 403),
+ ("inbox_only_without_implementation", ["inbox:write"], False, 200),
+ ("inbox_and_task_with_implementation", ["inbox:write", "task:write"], True, 200),
+ ]
+ )
+ def test_completion_with_automatic_implementation_needs_task_scope(
+ self, _name: str, scopes: list[str], automatic_implementation: bool, expected: int
+ ) -> None:
+ self.draft["automatic_implementation"] = automatic_implementation
+ raw = self.create_personal_api_key_with_scopes([*scopes, "signal_scout:write", "llm_skill:write"])
+ self.client.logout()
+ self.client.credentials(HTTP_AUTHORIZATION=f"Bearer {raw}")
+ with (
+ patch(
+ "products.signals.backend.onboarding_completion.InboxOnboardingReconciler.has_repository",
+ return_value=object(),
+ ),
+ patch("products.signals.backend.tasks.launch_inbox_onboarding_job.delay"),
+ ):
+ response = self.client.post(f"{self.url}complete/", self.draft, format="json")
+ assert response.status_code == expected, response.content
+ if expected == 403:
+ assert "task:write" in response.json()["detail"]
+ config = SignalTeamConfig.objects.get(team=self.team)
+ assert bool((config.onboarding or {}).get("completed_at")) is (expected == 200)
+ if expected == 200:
+ assert config.autostart_enabled is automatic_implementation
+ else:
+ assert config.autostart_enabled is not True
+
@parameterized.expand([("unchanged", True), ("user_paused", False), ("withheld", False), ("task_only", False)])
def test_activation_resumes_only_onboarding_operational_pauses(self, state: str, enabled: bool) -> None:
seed_canonical_skills(self.team)
diff --git a/products/signals/backend/test/test_report_task_actions_api.py b/products/signals/backend/test/test_report_task_actions_api.py
index 7d197db8ee46..7d030dfd4477 100644
--- a/products/signals/backend/test/test_report_task_actions_api.py
+++ b/products/signals/backend/test/test_report_task_actions_api.py
@@ -295,6 +295,28 @@ class TestReportTaskActionsAPI(APIBaseTest):
assert response.status_code == status.HTTP_404_NOT_FOUND
workflow.assert_not_called()
+ @parameterized.expand(
+ [
+ ("inbox_only", ["inbox:write"], status.HTTP_403_FORBIDDEN),
+ ("inbox_and_task", ["inbox:write", "task:write"], status.HTTP_201_CREATED),
+ ("legacy_task_only", ["task:write"], status.HTTP_201_CREATED),
+ ]
+ )
+ def test_run_needs_task_scope_as_well_as_inbox_scope(
+ self, workflow: MagicMock, _flag_mock: MagicMock, _name: str, scopes: list[str], expected: int
+ ) -> None:
+ report = self._report(prompts=["Why does checkout fail?"])
+ api_key = self.create_personal_api_key_with_scopes(scopes)
+ self.client.logout()
+ self.client.credentials(HTTP_AUTHORIZATION=f"Bearer {api_key}")
+
+ response = self._run(report, {"action": "suggested_prompt", "suggested_prompt_index": 0})
+
+ assert response.status_code == expected, response.data
+ if expected == status.HTTP_403_FORBIDDEN:
+ assert "task:write" in response.json()["detail"]
+ assert not Task.objects.filter(signal_report=report).exists()
+
def test_refuses_without_ai_data_processing_approval(self, workflow: MagicMock, _flag_mock: MagicMock) -> None:
self.organization.is_ai_data_processing_approved = False
self.organization.save()
diff --git a/products/signals/backend/test/test_scout_harness_api.py b/products/signals/backend/test/test_scout_harness_api.py
index 8da1c30cd625..28d68d0cdd71 100644
--- a/products/signals/backend/test/test_scout_harness_api.py
+++ b/products/signals/backend/test/test_scout_harness_api.py
@@ -11,6 +11,7 @@ from posthog.test.base import APIBaseTest
from unittest.mock import AsyncMock, MagicMock, patch
from django.apps import apps
+from django.core.cache import cache
from django.test import SimpleTestCase
from django.utils import timezone
@@ -1684,6 +1685,32 @@ class TestScoutHarnessConfigWriteScopesAPI(APIBaseTest):
config.refresh_from_db()
assert config.write_scopes == (requested if expected == status.HTTP_200_OK else current)
+ @parameterized.expand(
+ [
+ ("legacy_task_key", ["signal_scout:write", "task:write"], status.HTTP_200_OK),
+ ("inbox_and_task_key", ["signal_scout:write", "inbox:write", "task:write"], status.HTTP_200_OK),
+ ("inbox_only_key", ["signal_scout:write", "inbox:write"], status.HTTP_403_FORBIDDEN),
+ ("narrow_key", ["signal_scout:write"], status.HTTP_403_FORBIDDEN),
+ ]
+ )
+ def test_adding_an_inbox_tool_accepts_the_legacy_task_scope(
+ self, _name: str, key_scopes: list[str], expected: int
+ ) -> None:
+ self._become_admin()
+ config = self._config()
+ SignalScoutConfig.objects.filter(pk=config.pk).update(allowed_mcp_tools=["insight-get"])
+ raw = self._personal_api_key(key_scopes)
+
+ with patch("posthoganalytics.feature_enabled", return_value=True):
+ response = self.client.patch(
+ self._detail_url(str(config.id)),
+ data={"allowed_mcp_tools": ["insight-get", "inbox-reports-claim"]},
+ format="json",
+ HTTP_AUTHORIZATION=f"Bearer {raw}",
+ )
+
+ assert response.status_code == expected, response.json()
+
@parameterized.expand(
[
("read", ["insight-get"], []),
@@ -2869,18 +2896,25 @@ class TestScoutHarnessNotesAPI(APIBaseTest):
@parameterized.expand(
[
# Every report-derived note quotes a report's id, title, and reviewer/reader text, all of
- # which the report API gates on `task:read`. A scout-only token must not read around that,
+ # which the report API gates on `inbox:read`. A scout-only token must not read around that,
# so all derived origins are withheld together — a new one must not reopen the gap.
- ("without_report_read", ["signal_scout:read"], {"steering"}),
+ ("without_report_read", ["signal_scout:read"], {"steering"}, set()),
(
"with_report_read",
+ ["signal_scout:read", "inbox:read"],
+ {"steering", "derived from a dismissal", "derived from feedback"},
+ set(),
+ ),
+ (
+ "with_legacy_task_read",
["signal_scout:read", "task:read"],
{"steering", "derived from a dismissal", "derived from feedback"},
+ {"inbox:read"},
),
]
)
def test_list_withholds_derived_notes_from_callers_without_report_read(
- self, _name: str, scopes: list[str], expected: set[str]
+ self, _name: str, scopes: list[str], expected: set[str], fallback_scopes: set[str]
) -> None:
from posthog.models.personal_api_key import PersonalAPIKey
from posthog.models.utils import generate_random_token_personal, hash_key_value
@@ -2900,10 +2934,17 @@ class TestScoutHarnessNotesAPI(APIBaseTest):
PersonalAPIKey.objects.create(label="k", user=self.user, secure_value=hash_key_value(raw), scopes=scopes)
self.client.logout()
- response = self.client.get(self._list_url(), HTTP_AUTHORIZATION=f"Bearer {raw}")
+ cache.clear()
+ with patch("posthog.permissions.posthoganalytics.capture") as capture:
+ response = self.client.get(self._list_url(), HTTP_AUTHORIZATION=f"Bearer {raw}")
assert response.status_code == status.HTTP_200_OK, response.content
assert {row["content"] for row in response.json()} == expected
+ assert {
+ call.kwargs["properties"]["required_scope"]
+ for call in capture.call_args_list
+ if call.kwargs["event"] == "api scope fallback used"
+ } == fallback_scopes
class TestAgentHarnessProjectProfileAPI(APIBaseTest):
@@ -4003,20 +4044,26 @@ class TestScoutHarnessConfigAPI(APIBaseTest):
[
("missing_integration_scope", ["signal_scout:write"], status.HTTP_403_FORBIDDEN, "integration:read"),
(
- "missing_task_scope",
+ "missing_inbox_scope",
["signal_scout:write", "integration:read"],
status.HTTP_403_FORBIDDEN,
- "task:read",
+ "inbox:read",
+ ),
+ (
+ "integration_and_inbox_scopes",
+ ["signal_scout:write", "integration:read", "inbox:read"],
+ status.HTTP_200_OK,
+ None,
),
(
- "integration_and_task_scopes",
+ "integration_and_legacy_task_scopes",
["signal_scout:write", "integration:read", "task:read"],
status.HTTP_200_OK,
None,
),
]
)
- def test_partial_update_slack_destination_requires_integration_and_task_scopes(
+ def test_partial_update_slack_destination_requires_integration_and_inbox_scopes(
self, _name: str, scopes: list[str], expected_status: int, expected_missing_scope: str | None
) -> None:
config = SignalScoutConfig.objects.create(team=self.team, skill_name="signals-scout-foo")
diff --git a/products/signals/backend/test/test_signal_report_api.py b/products/signals/backend/test/test_signal_report_api.py
index b5c2f65720d3..c08c3ddc7dfd 100644
--- a/products/signals/backend/test/test_signal_report_api.py
+++ b/products/signals/backend/test/test_signal_report_api.py
@@ -3624,6 +3624,63 @@ class TestSignalReportSuppressionAPI(APIBaseTest):
def _state_url(self, report_id: str) -> str:
return f"/api/projects/{self.team.id}/signals/reports/{report_id}/state/"
+ @parameterized.expand(
+ [
+ ("inbox_read", ["inbox:read"], status.HTTP_200_OK, status.HTTP_403_FORBIDDEN, False, set()),
+ ("inbox_write", ["inbox:write"], status.HTTP_200_OK, status.HTTP_200_OK, False, set()),
+ ("inbox_and_task", ["inbox:write", "task:write"], status.HTTP_200_OK, status.HTTP_200_OK, True, set()),
+ (
+ "legacy_task_write",
+ ["task:write"],
+ status.HTTP_200_OK,
+ status.HTTP_200_OK,
+ True,
+ {"inbox:read", "inbox:write"},
+ ),
+ ("legacy_task_read", ["task:read"], status.HTTP_200_OK, status.HTTP_403_FORBIDDEN, False, {"inbox:read"}),
+ ("unrelated", ["insight:read"], status.HTTP_403_FORBIDDEN, status.HTTP_403_FORBIDDEN, False, set()),
+ ]
+ )
+ def test_report_endpoints_require_inbox_scopes(
+ self,
+ _name: str,
+ scopes: list[str],
+ list_status: int,
+ state_status: int,
+ can_edit: bool,
+ fallback_scopes: set[str],
+ ) -> None:
+ cache.clear()
+ report = self._create_report()
+ api_key = self.create_personal_api_key_with_scopes(scopes)
+ self.client.logout()
+ self.client.credentials(HTTP_AUTHORIZATION=f"Bearer {api_key}")
+
+ with patch("posthog.permissions.posthoganalytics.capture") as capture:
+ listed = self.client.get(f"/api/projects/{self.team.id}/signals/reports/")
+ edited = self.client.patch(
+ f"/api/projects/{self.team.id}/signals/reports/{report.id}/", {"title": "Edited"}, format="json"
+ )
+ changed = self.client.post(self._state_url(str(report.id)), {"state": "suppressed"})
+ for_me = self.client.get(f"/api/projects/{self.team.id}/signals/reports/for_me/")
+ bulk_claimed = self.client.post(
+ f"/api/projects/{self.team.id}/signals/reports/bulk_claim/", {"ids": [str(report.id)]}, format="json"
+ )
+
+ assert listed.status_code == list_status
+ assert changed.status_code == state_status
+ assert bulk_claimed.status_code == state_status, bulk_claimed.content
+ # The ranking flag is off here, so a request that passes the scope check gets a 404.
+ assert for_me.status_code == (status.HTTP_404_NOT_FOUND if list_status == status.HTTP_200_OK else list_status)
+ assert edited.status_code == (status.HTTP_200_OK if can_edit else status.HTTP_403_FORBIDDEN), edited.content
+ if state_status == status.HTTP_403_FORBIDDEN:
+ assert "inbox:write" in changed.json()["detail"]
+ assert {
+ call.kwargs["properties"]["required_scope"]
+ for call in capture.call_args_list
+ if call.kwargs["event"] == "api scope fallback used"
+ } == fallback_scopes
+
@parameterized.expand([("wrong_assignee", True), ("analysis_wrong", False)])
def test_a_wrong_assignee_dismissal_also_removes_the_caller_with_a_reason(self, reason: str, removed: bool) -> None:
report = self._create_report()
diff --git a/products/signals/backend/test/test_signal_report_artefact_api.py b/products/signals/backend/test/test_signal_report_artefact_api.py
index 7378bd7d2332..805b18bd0876 100644
--- a/products/signals/backend/test/test_signal_report_artefact_api.py
+++ b/products/signals/backend/test/test_signal_report_artefact_api.py
@@ -416,26 +416,55 @@ class TestSignalReportArtefactViewSet(APIBaseTest):
assert [r["github_login"] for r in json.loads(new_row.content)] == ["bob"]
assert [r["github_login"] for r in self._latest_reviewers(report)] == ["bob"]
- def test_put_reviewers_re_evaluates_autostart(self):
- # Appending a reviewers status re-runs the (idempotent) auto-start evaluation on commit.
+ @parameterized.expand(
+ [
+ ("put_session", "put", None, True),
+ ("put_inbox_and_task_key", "put", ["inbox:write", "task:write"], True),
+ ("put_inbox_only_key", "put", ["inbox:write"], False),
+ ("post_inbox_and_task_key", "post", ["inbox:write", "task:write"], True),
+ ("post_inbox_only_key", "post", ["inbox:write"], False),
+ ]
+ )
+ def test_reviewer_writes_need_task_scope_and_re_evaluate_autostart(
+ self, _name: str, method: str, scopes: list[str] | None, allowed: bool
+ ):
report = self._create_report()
artefact = self._create_artefact(report, content=[{"github_login": "alice"}])
+ if scopes is not None:
+ api_key = self.create_personal_api_key_with_scopes(scopes)
+ self.client.logout()
+ self.client.credentials(HTTP_AUTHORIZATION=f"Bearer {api_key}")
+ content = [{"github_login": "alice"}, {"github_login": "bob"}]
with patch(
"products.signals.backend.auto_start.maybe_autostart_from_report_artefacts",
new_callable=AsyncMock,
) as mock_autostart:
with self.captureOnCommitCallbacks(execute=True):
- response = self.client.put(
- self._detail_url(str(report.id), str(artefact.id)),
- data=json.dumps({"content": [{"github_login": "alice"}, {"github_login": "bob"}]}),
- content_type="application/json",
- )
+ if method == "put":
+ response = self.client.put(
+ self._detail_url(str(report.id), str(artefact.id)),
+ data=json.dumps({"content": content}),
+ content_type="application/json",
+ )
+ else:
+ response = self.client.post(
+ self._list_url(str(report.id)),
+ data=json.dumps({"artefact_type": "suggested_reviewers", "content": content}),
+ content_type="application/json",
+ )
- assert response.status_code == status.HTTP_200_OK
- mock_autostart.assert_awaited_once()
- assert mock_autostart.call_args.kwargs["report_id"] == str(report.id)
- assert mock_autostart.call_args.kwargs["team_id"] == self.team.id
+ if allowed:
+ assert response.status_code in (status.HTTP_200_OK, status.HTTP_201_CREATED), response.content
+ else:
+ assert response.status_code == status.HTTP_403_FORBIDDEN, response.content
+ assert [r["github_login"] for r in self._latest_reviewers(report)] == (
+ ["alice", "bob"] if allowed else ["alice"]
+ )
+ assert mock_autostart.await_count == (1 if allowed else 0)
+ if allowed:
+ assert mock_autostart.call_args.kwargs["report_id"] == str(report.id)
+ assert mock_autostart.call_args.kwargs["team_id"] == self.team.id
def test_put_adding_reviewer_notifies_added_reviewer_on_commit(self):
# Manually adding a reviewer enqueues a Slack ping (after commit) for only the newly-added
diff --git a/products/signals/backend/test/test_signal_report_assignment_api.py b/products/signals/backend/test/test_signal_report_assignment_api.py
index 6faf37b09c05..b3c2a26673b9 100644
--- a/products/signals/backend/test/test_signal_report_assignment_api.py
+++ b/products/signals/backend/test/test_signal_report_assignment_api.py
@@ -28,7 +28,10 @@ from products.signals.backend.models import (
SignalReportMonitoringAttempt,
SignalReportPullRequest,
)
-from products.signals.backend.report_assignments import update_assignments_for_pull_request
+from products.signals.backend.report_assignments import (
+ sync_task_pull_request_to_assignments,
+ update_assignments_for_pull_request,
+)
from products.signals.backend.report_claims import get_active_claim, get_active_claims, responsible_users
from products.signals.backend.report_monitoring_attempts import complete_implementation
@@ -555,6 +558,44 @@ class TestSignalReportAssignmentAPI(APIBaseTest):
assert note.json()["claim_id"] == claim_id
assert release.status_code == status.HTTP_409_CONFLICT
+ @parameterized.expand(
+ [
+ ("claim_inbox_only", "claim", ["inbox:write"], False),
+ ("bulk_claim_inbox_only", "bulk_claim", ["inbox:write"], False),
+ ("claim_inbox_and_task", "claim", ["inbox:write", "task:write"], True),
+ ("bulk_claim_inbox_and_task", "bulk_claim", ["inbox:write", "task:write"], True),
+ ("claim_legacy_task", "claim", ["task:write"], True),
+ ]
+ )
+ def test_claiming_for_a_task_needs_task_scope(
+ self, _name: str, endpoint: str, scopes: list[str], allowed: bool
+ ) -> None:
+ Task = apps.get_model("tasks", "Task")
+ task = Task.objects.create(
+ team=self.team,
+ created_by=self.user,
+ title="Signal task",
+ description="Implement the report",
+ origin_product=Task.OriginProduct.SIGNAL_REPORT,
+ )
+ report = self._create_report()
+ api_key = self.create_personal_api_key_with_scopes(scopes)
+ self.client.logout()
+ self.client.credentials(HTTP_AUTHORIZATION=f"Bearer {api_key}")
+ url, body = (
+ (self._claim_url(report), {})
+ if endpoint == "claim"
+ else (f"/api/projects/{self.team.id}/signals/reports/bulk_claim/", {"ids": [str(report.id)]})
+ )
+
+ response = self.client.post(url, data=body, format="json", headers={"X-PostHog-Task-Id": str(task.id)})
+
+ assert response.status_code == (status.HTTP_200_OK if allowed else status.HTTP_403_FORBIDDEN), response.content
+ linked = sync_task_pull_request_to_assignments(
+ team_id=self.team.id, task_id=str(task.id), pr_url="https://github.com/example/private/pull/9"
+ )
+ assert (linked > 0) is allowed
+
def test_internal_task_claim_uses_task_attribution(self):
Task = apps.get_model("tasks", "Task")
task = Task.objects.create(
@@ -742,6 +783,56 @@ class TestSignalReportAssignmentAPI(APIBaseTest):
assert pr.state == SignalReportAssignment.PrState.UNKNOWN
assert pr.state != "merged"
+ @parameterized.expand(
+ [
+ ("inbox_only_claim", ["inbox:write"], {}, status.HTTP_200_OK, False),
+ (
+ "legacy_task_only_pr",
+ ["task:write"],
+ {"pr_url": "https://github.com/example/private/pull/9"},
+ status.HTTP_200_OK,
+ True,
+ ),
+ (
+ "inbox_only_pr_url",
+ ["inbox:write"],
+ {"pr_url": "https://github.com/example/private/pull/9"},
+ status.HTTP_403_FORBIDDEN,
+ False,
+ ),
+ (
+ "inbox_only_pull_requests",
+ ["inbox:write"],
+ {"pull_requests": ["https://github.com/example/private/pull/9"]},
+ status.HTTP_403_FORBIDDEN,
+ False,
+ ),
+ (
+ "inbox_and_task_pull_requests",
+ ["inbox:write", "task:write"],
+ {"pull_requests": ["https://github.com/example/private/pull/9"]},
+ status.HTTP_200_OK,
+ True,
+ ),
+ ]
+ )
+ @patch(
+ "products.signals.backend.report_assignments.GitHubIntegration.first_for_team_repository",
+ return_value=None,
+ )
+ def test_linking_a_pull_request_needs_task_scope(
+ self, _name: str, scopes: list[str], body: dict, expected: int, linked: bool, _integration: MagicMock
+ ) -> None:
+ report = self._create_report()
+ api_key = self.create_personal_api_key_with_scopes(scopes)
+ self.client.logout()
+ self.client.credentials(HTTP_AUTHORIZATION=f"Bearer {api_key}")
+
+ response = self.client.post(self._claim_url(report), data=body, format="json")
+
+ assert response.status_code == expected, response.content
+ assert SignalReportPullRequest.objects.for_team(self.team.id).filter(number=9).exists() is linked
+
@parameterized.expand(
[
("claiming_agent", "claude-code", False, False, status.HTTP_200_OK),
diff --git a/products/signals/backend/test/test_signal_team_config_api.py b/products/signals/backend/test/test_signal_team_config_api.py
index e9b5a93e1542..3a344a532eb9 100644
--- a/products/signals/backend/test/test_signal_team_config_api.py
+++ b/products/signals/backend/test/test_signal_team_config_api.py
@@ -97,6 +97,72 @@ class TestSignalTeamConfigAPI(APIBaseTest):
assert self.client.get(self._url()).status_code == 200
self.config.refresh_from_db()
assert getattr(self.config, field) in (None, [])
+ form_response = self.client.post(
+ self._url(),
+ {f"{field}[0]" if field == "implementation_repositories" else field: "example/assets"},
+ format="multipart",
+ )
+ assert form_response.status_code == 403, form_response.content
+
+ @parameterized.expand(
+ [
+ (
+ "implementation_repositories",
+ "implementation_repositories",
+ ["example/assets"],
+ ["inbox:write"],
+ status.HTTP_403_FORBIDDEN,
+ ),
+ ("inbox_only", "implementation_instructions", "Push to main.", ["inbox:write"], status.HTTP_403_FORBIDDEN),
+ (
+ "inbox_and_task",
+ "implementation_instructions",
+ "Push to main.",
+ ["inbox:write", "task:write"],
+ status.HTTP_200_OK,
+ ),
+ ("legacy_task_only", "implementation_instructions", "Push to main.", ["task:write"], status.HTTP_200_OK),
+ ("scout_steering", "scout_instructions", "Ignore errors.", ["inbox:write"], status.HTTP_403_FORBIDDEN),
+ ("research_steering", "research_instructions", "Skip checks.", ["inbox:write"], status.HTTP_403_FORBIDDEN),
+ ("pull_request_label", "pull_request_label", "auto-merge", ["inbox:write"], status.HTTP_403_FORBIDDEN),
+ (
+ "github_issue_writeback",
+ "github_issue_writeback_enabled",
+ True,
+ ["inbox:write"],
+ status.HTTP_403_FORBIDDEN,
+ ),
+ ]
+ )
+ def test_task_run_fields_need_task_scope(
+ self, _name: str, field: str, value: str | list[str] | bool, scopes: list[str], expected: int
+ ) -> None:
+ self.organization_membership.level = OrganizationMembership.Level.ADMIN
+ self.organization_membership.save()
+ api_key = self.create_personal_api_key_with_scopes(scopes)
+ self.client.logout()
+ self.client.credentials(HTTP_AUTHORIZATION=f"Bearer {api_key}")
+
+ response = self.client.post(self._url(), {field: value}, format="json")
+
+ assert response.status_code == expected, response.content
+ self.config.refresh_from_db()
+ assert (getattr(self.config, field) == value) is (expected == status.HTTP_200_OK)
+
+ def test_form_encoded_task_run_field_needs_task_scope(self) -> None:
+ self.organization_membership.level = OrganizationMembership.Level.ADMIN
+ self.organization_membership.save()
+ api_key = self.create_personal_api_key_with_scopes(["inbox:write"])
+ self.client.logout()
+ self.client.credentials(HTTP_AUTHORIZATION=f"Bearer {api_key}")
+
+ response = self.client.post(
+ self._url(), {"autostart_base_branches.example/repo": "release"}, format="multipart"
+ )
+
+ assert response.status_code == status.HTTP_403_FORBIDDEN, response.content
+ self.config.refresh_from_db()
+ assert self.config.autostart_base_branches != {"example/repo": "release"}
def test_steering_save_preserves_a_concurrent_autonomy_change(self) -> None:
self.organization_membership.level = OrganizationMembership.Level.MEMBER
diff --git a/products/signals/backend/views.py b/products/signals/backend/views.py
index 501d2db09edf..9a5d11e619cb 100644
--- a/products/signals/backend/views.py
+++ b/products/signals/backend/views.py
@@ -524,7 +524,7 @@ class SignalSourceConfigViewSet(TeamAndOrgViewSetMixin, viewsets.ModelViewSet):
serializer_class = SignalSourceConfigSerializer
authentication_classes = [SessionAuthentication, PersonalAPIKeyAuthentication, OAuthAccessTokenAuthentication]
permission_classes = [IsAuthenticated, APIScopePermission]
- scope_object = "task"
+ scope_object = "inbox"
queryset = SignalSourceConfig.objects.all().order_by("-updated_at")
@tracer.start_as_current_span("signals.source_configs.list")
@@ -680,12 +680,15 @@ class SignalSourceConfigViewSet(TeamAndOrgViewSetMixin, viewsets.ModelViewSet):
_SANDBOX_PROTECTED_CONFIG_FIELDS = (*STEERING_FIELDS.values(), "implementation_repositories")
+def _submitted_config_fields(request: Request) -> set[str]:
+ # A form encoding sends a nested value as `field.key` or `field[0]`, and DRF folds it back into `field`.
+ return {re.split(r"[.\[]", key, maxsplit=1)[0] for key in request.data} if isinstance(request.data, dict) else set()
+
+
class SignalSteeringPermission(BasePermission):
def has_permission(self, request: Request, view: APIView) -> bool:
- if (
- request.method in ("GET", "HEAD", "OPTIONS")
- or not isinstance(request.data, dict)
- or not any(field in request.data for field in _SANDBOX_PROTECTED_CONFIG_FIELDS)
+ if request.method in ("GET", "HEAD", "OPTIONS") or _submitted_config_fields(request).isdisjoint(
+ _SANDBOX_PROTECTED_CONFIG_FIELDS
):
return True
if is_sandbox_oauth_request(request):
@@ -705,14 +708,31 @@ class SignalTeamConfigViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
permission_classes = [IsAuthenticated, APIScopePermission, SignalSteeringPermission]
serializer_class = SignalTeamConfigSerializer
queryset = SignalTeamConfig.objects.all()
- scope_object = "task"
+ scope_object = "inbox"
# The read returns the singleton, so the inherited limit and offset params are noise.
pagination_class = None
+ # These fields start, steer, or shape the output of agent task runs, so an inbox-only credential must not set them.
+ TASK_RUN_FIELDS = (
+ "autostart_enabled",
+ "autostart_base_branches",
+ "default_autostart_priority",
+ "default_open_pull_request_ready",
+ "issue_tracking_integration",
+ "issue_tracking_config",
+ "pull_request_label_enabled",
+ "pull_request_label",
+ "implementation_repositories",
+ "github_issue_writeback_enabled",
+ *STEERING_FIELDS.values(),
+ )
+
def dangerously_get_required_scopes(self, request: Request, view) -> list[str] | None:
if request.method in ("GET", "HEAD", "OPTIONS"):
- return ["task:read"]
- return ["task:write"]
+ return ["inbox:read"]
+ if not _submitted_config_fields(request).isdisjoint(self.TASK_RUN_FIELDS):
+ return ["inbox:write", "task:write"]
+ return ["inbox:write"]
def _get_config(self) -> SignalTeamConfig:
# Singleton per team with safe defaults. A post_save signal creates it on team
@@ -1668,9 +1688,25 @@ class SignalReportViewSet(
serializer_class = SignalReportSerializer
authentication_classes = [SessionAuthentication, PersonalAPIKeyAuthentication, OAuthAccessTokenAuthentication]
permission_classes = [IsAuthenticated, APIScopePermission]
- scope_object = "task"
+ scope_object = "inbox"
queryset = SignalReport.objects.all()
pagination_class = SignalReportListPagination
+
+ request_dependent_scope_actions = frozenset({"claim", "bulk_claim"})
+
+ def dangerously_get_required_scopes(self, request: Request, view) -> list[str] | None:
+ # The title and summary become an implementation task's prompt, so editing them is task work.
+ if self.action == "partial_update":
+ return ["inbox:write", "task:write"]
+ if self.action in ("claim", "bulk_claim"):
+ # A linked PR can be in any repo the team's GitHub integration reaches, and `pr_comments` then returns
+ # its private comments and diff hunks. A claim that names a task links the PRs of that task's later runs.
+ # An inbox-only credential can claim for its user, but it cannot link a PR or claim for a task.
+ attaches_pull_requests = not _submitted_config_fields(request).isdisjoint({"pr_url", "pull_requests"})
+ names_a_task = bool(request.headers.get(TASK_ID_HEADER, "").strip())
+ return ["inbox:write", "task:write"] if attaches_pull_requests or names_a_task else ["inbox:write"]
+ return None
+
# Shared Q for "ready but not actionable" — used in status ranking and suggested-reviewer suppression.
_Q_READY_NOT_ACTIONABLE = Q(status=SignalReport.Status.READY) & Q(latest_actionability="not_actionable")
_DEFAULT_SIGNAL_REPORT_ORDERING = "-is_suggested_reviewer,status,-updated_at"
@@ -1725,7 +1761,7 @@ class SignalReportViewSet(
detail=False,
methods=["get"],
url_path="ranking_outcomes",
- required_scopes=["task:read"],
+ required_scopes=["inbox:read"],
pagination_class=None,
)
def ranking_outcomes(self, request: Request, **kwargs) -> Response:
@@ -1757,7 +1793,7 @@ class SignalReportViewSet(
"for the new list. Only the user the list is about can read it."
),
)
- @action(detail=False, methods=["get"], url_path="for_me", required_scopes=["task:read"], pagination_class=None)
+ @action(detail=False, methods=["get"], url_path="for_me", required_scopes=["inbox:read"], pagination_class=None)
def for_me(self, request: ValidatedRequest, **kwargs: Any) -> Response:
user = request.user
# A list describes one person, so only that person's own credentials can read it.
@@ -1811,7 +1847,7 @@ class SignalReportViewSet(
"`has_implementation_pr`, `include_all_statuses` and `view`, because the counts set those."
),
)
- @action(detail=False, methods=["get"], required_scopes=["task:read"], pagination_class=None)
+ @action(detail=False, methods=["get"], required_scopes=["inbox:read"], pagination_class=None)
@tracer.start_as_current_span("signals.reports.section_counts")
def section_counts(self, request: ValidatedRequest, *args: Any, **kwargs: Any) -> Response:
if trial_store_for_request(request, self.team_id) is not None:
@@ -1834,7 +1870,7 @@ class SignalReportViewSet(
return Response(SignalReportSectionCountsSerializer(counts).data)
@extend_schema(request=ReportReadStateRequestSerializer, responses=ReportReadStateResponseSerializer)
- @action(detail=False, methods=["post"], required_scopes=["task:read"])
+ @action(detail=False, methods=["post"], required_scopes=["inbox:read"])
def read_state(self, request, **kwargs):
serializer = ReportReadStateRequestSerializer(data=request.data)
serializer.is_valid(raise_exception=True)
@@ -2821,11 +2857,12 @@ class SignalReportViewSet(
description=(
"Start or update work for the current user, internal task, or external agent. "
"Supply claim_id to resume, pull_requests to add PRs, takeover=true to explicitly take ownership, "
- "or release=true to end ownership while preserving work history and PR links."
+ "or release=true to end ownership while preserving work history and PR links. "
+ "Adding PRs needs task:write as well as inbox:write."
),
operation_id="signals_reports_claim",
)
- @action(detail=True, methods=["post"], url_path="claim", required_scopes=["task:write"])
+ @action(detail=True, methods=["post"], url_path="claim")
def claim(self, request: Request, *args, **kwargs) -> Response:
request_serializer = SignalReportClaimSerializer(data=request.data)
request_serializer.is_valid(raise_exception=True)
@@ -2863,7 +2900,7 @@ class SignalReportViewSet(
description="Append an attributed priority correction, preserving the previous judgment for future learning.",
operation_id="signals_reports_priority_update",
)
- @action(detail=True, methods=["put"], required_scopes=["task:write"])
+ @action(detail=True, methods=["put"], required_scopes=["inbox:write", "task:write"])
def priority(self, request: ValidatedRequest, *args: object, **kwargs: object) -> Response:
report = cast(SignalReport, self.get_object())
update_report_priority(
@@ -3151,7 +3188,7 @@ class SignalReportViewSet(
)
},
)
- @action(detail=False, methods=["get"], url_path="available_reviewers", required_scopes=["task:read"])
+ @action(detail=False, methods=["get"], url_path="available_reviewers", required_scopes=["inbox:read"])
def available_reviewers(self, request, **kwargs):
with tracer.start_as_current_span("signals.available_reviewers") as span:
# Search all org members, not only the GitHub-linked ones: a reviewer is a PostHog user,
@@ -3183,7 +3220,7 @@ class SignalReportViewSet(
request=SignalReportArtefactWriteSerializer,
responses={200: SignalReportSuggestedReviewersArtefactSerializer},
)
- @action(detail=True, methods=["put"], url_path="reviewers", required_scopes=["task:write"])
+ @action(detail=True, methods=["put"], url_path="reviewers", required_scopes=["inbox:write", "task:write"])
def reviewers(self, request, **kwargs):
"""Apply a human reviewer edit, including on reports without a reviewer artefact."""
report = cast(SignalReport, self.get_object())
@@ -3244,7 +3281,9 @@ class SignalReportViewSet(
400: OpenApiResponse(description="The reason is invalid, or a reviewer who stays no longer resolves."),
},
)
- @action(detail=True, methods=["delete", "post"], url_path="reviewers/me", required_scopes=["task:write"])
+ @action(
+ detail=True, methods=["delete", "post"], url_path="reviewers/me", required_scopes=["inbox:write", "task:write"]
+ )
def leave_reviewers(self, request, **kwargs):
report = cast(SignalReport, self.get_object())
removal = SignalReportLeaveReviewersSerializer(data=request.data if request.method == "POST" else {})
@@ -3303,7 +3342,7 @@ class SignalReportViewSet(
description="Fetch all signals for a report from ClickHouse, including full metadata.",
responses={200: ReportSignalsResponseSerializer},
)
- @action(detail=True, methods=["get"], url_path="signals", required_scopes=["task:read"])
+ @action(detail=True, methods=["get"], url_path="signals", required_scopes=["inbox:read"])
def signals(self, request, pk=None, **kwargs):
"""Fetch all signals for a report from ClickHouse, including full metadata."""
with trial_state_errors():
@@ -3327,7 +3366,7 @@ class SignalReportViewSet(
request=SignalReportStateRequestSerializer,
responses={200: SignalReportSerializer},
)
- @action(detail=True, methods=["post"], url_path="state", required_scopes=["task:write"])
+ @action(detail=True, methods=["post"], url_path="state", required_scopes=["inbox:write"])
def state(self, request, pk=None, **kwargs):
"""
Transition a report to a new state. The model validates allowed transitions, except that a
@@ -3426,7 +3465,7 @@ class SignalReportViewSet(
),
operation_id="signals_reports_merge_create",
)
- @action(detail=True, methods=["post"], url_path="merge", required_scopes=["task:write"])
+ @action(detail=True, methods=["post"], url_path="merge", required_scopes=["inbox:write"])
def merge(self, request: ValidatedRequest, pk=None, **kwargs):
survivor = cast(SignalReport, self.get_object())
data = request.validated_data
@@ -3492,7 +3531,7 @@ class SignalReportViewSet(
),
operation_id="signals_reports_actions_list",
)
- @action(detail=True, methods=["get"], url_path="actions", required_scopes=["task:read"])
+ @action(detail=True, methods=["get"], url_path="actions", required_scopes=["inbox:read"])
def task_actions(self, request: Request, *args, **kwargs) -> Response:
report = cast(SignalReport, self.get_object())
context = ReportTaskActionContext(team=self.team, user=cast(User, request.user))
@@ -3559,7 +3598,8 @@ class SignalReportViewSet(
detail=True,
methods=["post"],
url_path="actions/run",
- required_scopes=["task:write"],
+ # The action starts a task, so an inbox-only credential must not reach it.
+ required_scopes=["inbox:write", "task:write"],
throttle_classes=[ReportTaskActionRunBurstThrottle, ReportTaskActionRunSustainedThrottle],
)
def run_task_action(self, request: ValidatedRequest, *args, **kwargs) -> Response:
@@ -3645,7 +3685,7 @@ class SignalReportViewSet(
)
@extend_schema(responses=SignalReportFeedbackStateSerializer)
- @action(detail=True, methods=["get"], required_scopes=["task:read"])
+ @action(detail=True, methods=["get"], required_scopes=["inbox:read"])
def feedback_state(self, request: Request, pk=None, **kwargs) -> Response:
report = self.get_object()
metadata = (
@@ -3674,7 +3714,7 @@ class SignalReportViewSet(
request=SignalReportFeedbackRequestSerializer,
responses={200: SignalReportFeedbackResponseSerializer},
)
- @action(detail=True, methods=["post"], url_path="feedback", required_scopes=["task:read"])
+ @action(detail=True, methods=["post"], url_path="feedback", required_scopes=["inbox:read"])
def feedback(self, request, pk=None, **kwargs):
"""Persist a report's thumbs rating and forward its note to the authoring scout.
@@ -3738,11 +3778,11 @@ class SignalReportViewSet(
request=None,
responses={204: None},
)
- # task:read, not task:write: recording that someone read a report is part of reading it.
+ # inbox:read, not inbox:write: recording that someone read a report is part of reading it.
# Under resource-level RBAC a `:write` scope demands editor access, which would 403 the
# viewer-level members whose reads this endpoint exists to capture. Token automation is
# already excluded by the session-authentication gate, not by scope.
- @action(detail=True, methods=["post"], url_path="viewed", required_scopes=["task:read"])
+ @action(detail=True, methods=["post"], url_path="viewed", required_scopes=["inbox:read"])
def viewed(self, request, pk=None, **kwargs):
"""Upsert a per-person view record for the report.
@@ -3788,13 +3828,13 @@ class SignalReportViewSet(
),
operation_id="signals_reports_refresh_metrics_create",
)
- # task:read, like `viewed`: refreshing a number a person is looking at is part of reading it,
+ # inbox:read, like `viewed`: refreshing a number a person is looking at is part of reading it,
# and the write is a cache of query output rather than report content.
@action(
detail=False,
methods=["post"],
url_path="refresh_metrics",
- required_scopes=["task:read"],
+ required_scopes=["inbox:read"],
throttle_classes=[
ReportMetricRefreshThrottle,
ClickHouseBurstRateThrottle,
@@ -3832,7 +3872,7 @@ class SignalReportViewSet(
detail=False,
methods=["post"],
url_path="source_metadata",
- required_scopes=["task:read"],
+ required_scopes=["inbox:read"],
throttle_classes=[ClickHouseBurstRateThrottle, ClickHouseSustainedRateThrottle],
)
@tracer.start_as_current_span("signals.reports.source_metadata")
@@ -4346,7 +4386,7 @@ class SignalReportViewSet(
responses={200: SignalReportBulkStateResponseSerializer},
)
# nosemgrep: api-path-underscore -- shipped public API path, a rename breaks clients
- @action(detail=False, methods=["post"], url_path="bulk-state", required_scopes=["task:write"])
+ @action(detail=False, methods=["post"], url_path="bulk-state", required_scopes=["inbox:write"])
def bulk_state(self, request, **kwargs):
"""
Transition many reports to a new state in one call.
@@ -4450,7 +4490,7 @@ class SignalReportViewSet(
),
operation_id="signals_reports_bulk_claim",
)
- @action(detail=False, methods=["post"], url_path="bulk_claim", required_scopes=["task:write"])
+ @action(detail=False, methods=["post"], url_path="bulk_claim")
def bulk_claim(self, request: ValidatedRequest, *args: object, **kwargs: object) -> Response:
data = request.validated_data
ordered_ids = list(dict.fromkeys(str(raw_id) for raw_id in data["ids"]))
@@ -4555,7 +4595,7 @@ class SignalReportViewSet(
),
operation_id="signals_reports_refund_create",
)
- @action(detail=True, methods=["post"], url_path="refund", required_scopes=["task:write"])
+ @action(detail=True, methods=["post"], url_path="refund", required_scopes=["inbox:write"])
def refund(self, request: ValidatedRequest, pk=None, **kwargs):
if not self._signals_pr_refunds_enabled():
raise NotFound("PR refunds are not enabled for this organization.")
@@ -4722,7 +4762,7 @@ class SignalReportViewSet(
operation_id="signals_reports_refund_summary_retrieve",
)
# nosemgrep: api-path-underscore -- shipped public API path, a rename breaks clients
- @action(detail=False, methods=["get"], url_path="refund-summary", required_scopes=["task:read"])
+ @action(detail=False, methods=["get"], url_path="refund-summary", required_scopes=["inbox:read"])
def refund_summary(self, request: Request, **kwargs):
# Two independent flags can each make this endpoint matter: refunds (the netting numbers)
# and quota enforcement (`quota_limited` drives the widget's paused banner, and enforcement
@@ -4762,7 +4802,7 @@ class SignalReportViewSet(
202: OpenApiResponse(response=SignalReportReingestionStatusSerializer, description="Re-ingestion started."),
},
)
- @action(detail=True, methods=["post"], url_path="reingest", required_scopes=["task:write"])
+ @action(detail=True, methods=["post"], url_path="reingest", required_scopes=["inbox:write"])
def reingest(self, request, pk=None, **kwargs):
"""Re-ingest a report's signals (same team access as other report actions)."""
report = cast(SignalReport, self.get_object())
@@ -4832,7 +4872,7 @@ class SignalReportViewSet(
),
operation_id="signals_report_pr_checks",
)
- @action(detail=True, methods=["get"], url_path="pr_checks", required_scopes=["task:read"])
+ @action(detail=True, methods=["get"], url_path="pr_checks", required_scopes=["inbox:read"])
def pr_checks(self, request: Request, *args, **kwargs) -> Response:
return self._pr_github_passthrough(
cast(SignalReport, self.get_object()), "get_pull_request_checks", "checks", "checks"
@@ -4869,7 +4909,7 @@ class SignalReportViewSet(
),
operation_id="signals_reports_pr_ci_statuses",
)
- @action(detail=False, methods=["get"], url_path="pr_ci_statuses", required_scopes=["task:read"])
+ @action(detail=False, methods=["get"], url_path="pr_ci_statuses", required_scopes=["inbox:read"])
def pr_ci_statuses(self, request: Request, **kwargs) -> Response:
requested_ids = parse_pr_ci_status_report_ids(request.query_params.get("report_ids"))
# Team-scoped via `get_queryset`, so an id belonging to another team resolves to nothing.
@@ -4935,7 +4975,7 @@ class SignalReportViewSet(
),
operation_id="signals_report_pr_comments",
)
- @action(detail=True, methods=["get"], url_path="pr_comments", required_scopes=["task:read"])
+ @action(detail=True, methods=["get"], url_path="pr_comments", required_scopes=["inbox:read"])
def pr_comments(self, request: Request, *args, **kwargs) -> Response:
return self._pr_github_passthrough(
cast(SignalReport, self.get_object()), "get_pull_request_comments", "comments", "comments"
@@ -4968,7 +5008,7 @@ class SignalReportViewSet(
),
operation_id="signals_report_pr_review_comments_create",
)
- @action(detail=True, methods=["post"], url_path="pr_review_comments", required_scopes=["task:write"])
+ @action(detail=True, methods=["post"], url_path="pr_review_comments", required_scopes=["inbox:write"])
def pr_review_comments(self, request: Request, *args, **kwargs) -> Response:
report = cast(SignalReport, self.get_object())
serializer = PullRequestReviewCommentCreateSerializer(data=request.data)
@@ -5061,7 +5101,7 @@ class SignalReportViewSet(
detail=True,
methods=["patch", "delete"],
url_path=r"pr_review_comments/(?P<comment_id>[0-9]+)",
- required_scopes=["task:write"],
+ required_scopes=["inbox:write"],
)
def pr_review_comment(self, request: Request, *args, **kwargs) -> Response:
report = cast(SignalReport, self.get_object())
@@ -5112,7 +5152,7 @@ class SignalReportViewSet(
detail=True,
methods=["post"],
url_path=r"pr_review_comments/(?P<comment_id>[0-9]+)/reactions",
- required_scopes=["task:write"],
+ required_scopes=["inbox:write"],
)
def pr_review_comment_reactions(self, request: Request, *args, **kwargs) -> Response:
report = cast(SignalReport, self.get_object())
@@ -5164,7 +5204,7 @@ class SignalReportViewSet(
detail=True,
methods=["delete"],
url_path=r"pr_review_comments/(?P<comment_id>[0-9]+)/reactions/(?P<reaction_id>[0-9]+)",
- required_scopes=["task:write"],
+ required_scopes=["inbox:write"],
)
def pr_review_comment_reaction(self, request: Request, *args, **kwargs) -> Response:
report = cast(SignalReport, self.get_object())
@@ -6159,7 +6199,7 @@ class SignalReportCheckViewSet(
serializer_class = SignalReportCheckSerializer
authentication_classes = [SessionAuthentication, PersonalAPIKeyAuthentication, OAuthAccessTokenAuthentication]
permission_classes = [IsAuthenticated, APIScopePermission]
- scope_object = "task"
+ scope_object = "inbox"
queryset = SignalReportCheck.objects.unscoped().order_by(
Case(
When(status__in=SignalReportCheck.OPEN_STATUSES, then=Value(0)),
@@ -6207,7 +6247,7 @@ class SignalReportCheckViewSet(
description="Record a person's quality signal. Approval does not affect scheduling or execution.",
operation_id="signals_report_checks_approve_create",
)
- @action(detail=True, methods=["post"], url_path="approve", required_scopes=["task:write"])
+ @action(detail=True, methods=["post"], url_path="approve", required_scopes=["inbox:write"])
def approve(self, request: Request, *args, **kwargs) -> Response:
attribution = resolve_request_attribution(request, self.team.id)
if attribution.kind != "user" or not isinstance(request.successful_authenticator, SessionAuthentication):
@@ -6235,7 +6275,7 @@ class SignalReportCheckViewSet(
description="Atomically replace an open metric check. The old check stays live if the new one is invalid.",
operation_id="signals_report_checks_replace_create",
)
- @action(detail=True, methods=["post"], url_path="replace", required_scopes=["task:write", "query:read"])
+ @action(detail=True, methods=["post"], url_path="replace", required_scopes=["inbox:write", "query:read"])
def replace(self, request: ValidatedRequest, *args, **kwargs) -> Response:
check = cast(SignalReportCheck, self.get_object())
data = request.validated_data
@@ -6295,7 +6335,8 @@ class SignalReportArtefactViewSet(
):
"""Artefacts attached to a signal report.
- Two write surfaces, both gated by the `task:write` scope (already held by the agent tokens):
+ Two write surfaces, both gated by `inbox:write` and `task:write` (already held by the agent tokens).
+ Auto-start and implementation runs read these artefacts, so writing one is task work:
- PUT edits a report's suggested reviewers: it appends a new `suggested_reviewers` status
artefact (latest-wins, so the new row becomes current) with bespoke reviewer enrichment,
@@ -6316,7 +6357,13 @@ class SignalReportArtefactViewSet(
serializer_class = SignalReportArtefactSerializer
authentication_classes = [SessionAuthentication, PersonalAPIKeyAuthentication, OAuthAccessTokenAuthentication]
permission_classes = [IsAuthenticated, APIScopePermission]
- scope_object = "task"
+ scope_object = "inbox"
+
+ def dangerously_get_required_scopes(self, request: Request, view) -> list[str] | None:
+ if self.action in ("create", "update", "partial_update", "destroy"):
+ return ["inbox:write", "task:write"]
+ return None
+
# select_related: the read serializer renders `created_by` inline.
queryset = SignalReportArtefact.objects.select_related("created_by").order_by("-created_at", "-id")
http_method_names = ["get", "post", "put", "patch", "delete", "head", "options"]
@@ -6802,7 +6849,7 @@ class SignalReportArtefactViewSet(
parameters=[_REPORT_ID_PARAMETER],
operation_id="signals_report_artefacts_diff",
)
- @action(detail=True, methods=["get"], url_path="diff", required_scopes=["task:read"])
+ @action(detail=True, methods=["get"], url_path="diff", required_scopes=["inbox:read"])
def diff(self, request: Request, *args, **kwargs) -> Response:
artefact = cast(SignalReportArtefact, self.get_object())
if artefact.type != SignalReportArtefact.ArtefactType.COMMIT:
@@ -7062,7 +7109,7 @@ class SignalProcessingViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
"""View and control signal processing pipeline state for a team."""
# Same scope family as other signals team APIs (SignalSourceConfigViewSet, etc.)
- scope_object = "task"
+ scope_object = "inbox"
scope_object_write_actions = [
"create",
"update",
diff --git a/products/signals/frontend/generated/api.ts b/products/signals/frontend/generated/api.ts
index 38f6d113ce57..a7612e5e3367 100644
--- a/products/signals/frontend/generated/api.ts
+++ b/products/signals/frontend/generated/api.ts
@@ -666,7 +666,7 @@ export const getSignalsReportsClaimUrl = (projectId: string, id: string) => {
}
/**
- * Start or update work for the current user, internal task, or external agent. Supply claim_id to resume, pull_requests to add PRs, takeover=true to explicitly take ownership, or release=true to end ownership while preserving work history and PR links.
+ * Start or update work for the current user, internal task, or external agent. Supply claim_id to resume, pull_requests to add PRs, takeover=true to explicitly take ownership, or release=true to end ownership while preserving work history and PR links. Adding PRs needs task:write as well as inbox:write.
* @summary Claim or release a signal report
*/
export const signalsReportsClaim = async (
diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.ts
index f0b8ad6c486e..7f2d200291ee 100644
--- a/products/signals/frontend/generated/api.zod.ts
+++ b/products/signals/frontend/generated/api.zod.ts
@@ -720,7 +720,7 @@ export const SignalsReportsActionsRunCreateBody = /* @__PURE__ */ zod.object({
})
/**
- * Start or update work for the current user, internal task, or external agent. Supply claim_id to resume, pull_requests to add PRs, takeover=true to explicitly take ownership, or release=true to end ownership while preserving work history and PR links.
+ * Start or update work for the current user, internal task, or external agent. Supply claim_id to resume, pull_requests to add PRs, takeover=true to explicitly take ownership, or release=true to end ownership while preserving work history and PR links. Adding PRs needs task:write as well as inbox:write.
* @summary Claim or release a signal report
*/
export const signalsReportsClaimBodyPullRequestsItemMax = 2048
diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yaml
index 235dd7d17672..e1ab19cddd63 100644
--- a/products/signals/mcp/tools.yaml
+++ b/products/signals/mcp/tools.yaml
@@ -108,7 +108,7 @@ tools:
operation: signals_reports_ranking_outcomes_list
enabled: true
scopes:
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -125,7 +125,7 @@ tools:
operation: signals_reports_actions_list
enabled: true
scopes:
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -151,6 +151,7 @@ tools:
operation: signals_reports_actions_run_create
enabled: true
scopes:
+ - inbox:write
- task:write
annotations:
readOnly: false
@@ -181,6 +182,7 @@ tools:
operation: signals_report_artefacts_create
enabled: true
scopes:
+ - inbox:write
- task:write
annotations:
readOnly: false
@@ -211,6 +213,7 @@ tools:
operation: signals_report_artefacts_destroy
enabled: true
scopes:
+ - inbox:write
- task:write
annotations:
readOnly: false
@@ -228,7 +231,7 @@ tools:
operation: signals_report_artefacts_list
enabled: true
scopes:
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -251,7 +254,7 @@ tools:
operation: signals_report_artefacts_retrieve
enabled: true
scopes:
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -266,6 +269,7 @@ tools:
operation: signals_report_artefacts_partial_update
enabled: true
scopes:
+ - inbox:write
- task:write
annotations:
readOnly: false
@@ -296,7 +300,7 @@ tools:
operation: signals_report_checks_list
enabled: true
scopes:
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -315,7 +319,7 @@ tools:
operation: signals_report_checks_replace_create
enabled: true
scopes:
- - task:write
+ - inbox:write
- query:read
annotations:
readOnly: false
@@ -336,7 +340,7 @@ tools:
operation: signals_report_checks_retrieve
enabled: true
scopes:
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -350,6 +354,7 @@ tools:
operation: signals_reports_reviewers_update
enabled: true
scopes:
+ - inbox:write
- task:write
annotations:
readOnly: false
@@ -369,7 +374,7 @@ tools:
operation: signals_reports_bulk_state_create
enabled: true
scopes:
- - task:write
+ - inbox:write
annotations:
readOnly: false
destructive: true
@@ -386,6 +391,7 @@ tools:
operation: signals_reports_claim
enabled: true
scopes:
+ - inbox:write
- task:write
annotations:
readOnly: false
@@ -408,7 +414,7 @@ tools:
operation: signals_reports_feedback_create
enabled: true
scopes:
- - task:read
+ - inbox:read
- signal_scout:write
- llm_skill:write
annotations:
@@ -459,6 +465,7 @@ tools:
operation: signals_reports_reviewers_me_create
enabled: true
scopes:
+ - inbox:write
- task:write
annotations:
readOnly: false
@@ -481,7 +488,7 @@ tools:
operation: signals_reports_list
enabled: true
scopes:
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -552,7 +559,7 @@ tools:
operation: signals_reports_merge_create
enabled: true
scopes:
- - task:write
+ - inbox:write
annotations:
readOnly: false
destructive: true
@@ -578,7 +585,7 @@ tools:
operation: signals_reports_retrieve
enabled: true
scopes:
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -616,7 +623,7 @@ tools:
operation: signals_reports_state_create
enabled: true
scopes:
- - task:write
+ - inbox:write
annotations:
readOnly: false
destructive: true
@@ -636,6 +643,7 @@ tools:
operation: signals_reports_partial_update
enabled: true
scopes:
+ - inbox:write
- task:write
annotations:
readOnly: false
@@ -711,7 +719,7 @@ tools:
operation: signals_source_configs_create
enabled: true
scopes:
- - task:write
+ - inbox:write
annotations:
readOnly: false
destructive: false
@@ -730,7 +738,7 @@ tools:
operation: signals_source_configs_list
enabled: true
scopes:
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -754,7 +762,7 @@ tools:
operation: signals_source_configs_partial_update
enabled: true
scopes:
- - task:write
+ - inbox:write
annotations:
readOnly: false
destructive: false
@@ -770,7 +778,7 @@ tools:
operation: signals_source_configs_retrieve
enabled: true
scopes:
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -783,7 +791,7 @@ tools:
operation: signals_source_configs_update
enabled: true
scopes:
- - task:write
+ - inbox:write
annotations:
readOnly: false
destructive: false
@@ -796,7 +804,7 @@ tools:
operation: signals_config_list
enabled: true
scopes:
- - task:read
+ - inbox:read
title: Get Self-driving steering instructions
description: >
Read the current project's research, implementation, and scout instructions. Returns only the three
@@ -812,6 +820,7 @@ tools:
operation: signals_config_create
enabled: true
scopes:
+ - inbox:write
- task:write
annotations:
readOnly: false
@@ -1464,7 +1473,7 @@ tools:
enabled: true
scopes:
- signal_scout:read
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
@@ -1477,7 +1486,7 @@ tools:
with its `finding_id`, the deterministic `source_id` (`run:<run_id>:finding:<finding_id>`), and the linked
`report` (`id`, `title`, `status`) or `null` when the finding never matched a report (or the report was
deleted/suppressed). Use this to see *which* findings turned into actionable reports, not just what a run
- surfaced (`scout-runs-emissions-list`). Requires `task:read` on top of `signal_scout:read` because it
+ surfaced (`scout-runs-emissions-list`). Requires `inbox:read` on top of `signal_scout:read` because it
exposes report titles. Strictly team-scoped — a run UUID belonging to another team returns 404.
scout-runs-emissions-list:
operation: signals_scout_runs_emissions
@@ -1922,7 +1931,7 @@ tools:
enabled: true
scopes:
- signal_scout:read
- - task:read
+ - inbox:read
annotations:
readOnly: true
destructive: false
diff --git a/products/signals/skills/authoring-scouts/SKILL.md b/products/signals/skills/authoring-scouts/SKILL.md
index adf5cf1662c0..c02fbd1bf386 100644
--- a/products/signals/skills/authoring-scouts/SKILL.md
+++ b/products/signals/skills/authoring-scouts/SKILL.md
@@ -183,7 +183,7 @@ For an **existing scout**, tune with `posthog:scout-config-update` (find the `id
- `output_destinations` — defaults to none.
When adding Slack to an existing scout, first read `output_destinations`, then send the full object with every key preserved. Updates replace the object, so sending only `slack` removes an existing `webhook` pointer.
Set `slack` to deliver every surfaced report the scout emits (`ready` or `pending_input`) to Slack as well as the inbox; a report the judge suppressed stays out of Slack by design: an `integration_id` for the workspace, plus either a `channel` (`channel_id|#channel-name`) or up to five `users` to DM (`member_id|@display-name`), never both.
- A scoped API key or OAuth token needs `integration:read` and `task:read` (or the matching write scopes) on top of `signal_scout:write` to set `slack`; a minimally scoped credential gets a permission error.
+ A scoped API key or OAuth token needs `integration:read` and `inbox:read` (or the matching write scopes) on top of `signal_scout:write` to set `slack`; a minimally scoped credential gets a permission error.
`thread_reports: true` posts a report as a short lead message with the rest split into replies at the summary's section labels, so a long report isn't clipped; it doesn't change how findings post.
Slack delivery is a firehose of that one scout's output — no priority filter, no reviewer routing — so it suits a scout whose bar is already tight rather than a chatty one you're still calibrating.
A Slack-delivered scout is also exempt from the ignored-reports auto-pause, since consumption there isn't measurable.
@@ -232,7 +232,7 @@ The tools (reads on the public `signal_scout:read` scope; because scouts read no
`skill_name: "pipeline:report-research"` addresses the report pipeline's research stage instead of any scout, for guidance about how the reports it builds from clustered signals get researched, judged, and routed ("route billing-adjacent reports to the billing folks"). Reports a scout authors directly never pass through that stage, so a rule for them belongs in a fleet-wide note (omit `skill_name`) or a per-scout one. It is the only `pipeline:*` audience; any other value is rejected.
- `posthog:scout-notes-list` — browse the active notes; pass `skill_name` to see what a given scout will read.
Expect system-derived notes alongside the human ones: a dismissal or snooze note, a Discuss question, a thumbs-rating note, and a reviewer add/remove on a report are each forwarded to the relevant scout as a note, labelled by `origin` (`report_dismissal`, `report_discussion`, `report_feedback`, `report_reviewer_correction`; a note left directly is `human`). Derived notes expire on their own after ~30 days.
- Three caveats: a Discuss question or rating note only forwards when the person had the notes-write authorization themselves (skill-editor access plus, on a scoped credential, `signal_scout:write` and `llm_skill:write`); a reviewer correction only forwards when the person had skill-editor access on the canonical project (the reviewer change itself still lands on the report); and the list hides every derived origin from a caller without report read access (`task:read`), since they quote report content. A missing derived note can mean either. A dismissal note is still on the report and a Discuss question on its discussion task, but a rating note exists only as the forwarded scout note (plus an analytics event), so a rating note that did not forward is gone.
+ Three caveats: a Discuss question or rating note only forwards when the person had the notes-write authorization themselves (skill-editor access plus, on a scoped credential, `signal_scout:write` and `llm_skill:write`); a reviewer correction only forwards when the person had skill-editor access on the canonical project (the reviewer change itself still lands on the report); and the list hides every derived origin from a caller without report read access (`inbox:read`), since they quote report content. A missing derived note can mean either. A dismissal note is still on the report and a Discuss question on its discussion task, but a rating note exists only as the forwarded scout note (plus an analytics event), so a rating note that did not forward is gone.
- `posthog:scout-notes-delete {"id": "..."}` — retire a note that's been acted on or no longer applies.
- `posthog:scout-run-now {"id": <config_id>, "note": "..."}`: steer one run only. The note (up to 1,000 characters) is read by that run next to the durable notes and is never delivered to a later run as a note, so use it for "check this now" instead of a note every scheduled run would keep reading. It does stay visible in that run's metadata (`run_note`) when a later run reads its history, so phrase it as a dated one-off ("today only: ...") rather than standing policy. It needs skill-editor access and, on a scoped credential, `llm_skill:write` on top of the base `signal_scout:write`, the same two scopes as a durable note (a 403 otherwise; drop the note to run without it), and spends a run like any manual dispatch.
diff --git a/products/signals/skills/authoring-scouts/references/report-checks.md b/products/signals/skills/authoring-scouts/references/report-checks.md
index 929aa0a799ed..5fc1df2c7c3b 100644
--- a/products/signals/skills/authoring-scouts/references/report-checks.md
+++ b/products/signals/skills/authoring-scouts/references/report-checks.md
@@ -12,7 +12,7 @@ There is no create surface for a person or a task token: the `inbox-report-check
Always list the report's checks before you write one:
- Inside a run: `posthog:scout-report-check-list {"report_id": "<report>"}`. The `report_id` is the only input.
-- Outside a run: `posthog:inbox-report-checks-list` (read-only, `task:read`).
+- Outside a run: `posthog:inbox-report-checks-list` (read-only, `inbox:read`).
Two reasons this is a hard step, not a courtesy:
diff --git a/products/signals/skills/authoring-scouts/references/report-contract.md b/products/signals/skills/authoring-scouts/references/report-contract.md
index 6f4fa176ee4c..dad6087f5fe4 100644
--- a/products/signals/skills/authoring-scouts/references/report-contract.md
+++ b/products/signals/skills/authoring-scouts/references/report-contract.md
@@ -440,7 +440,7 @@ Cap is **3 prompts per report**, each **≤200 characters**, and duplicates are
When a report would have had better evidence from a product the project does not use, record a `source_suggestion` artefact on it.
After `emit_report` or `edit_report` returns the report id, call `inbox-report-artefacts-create` with `artefact_type: "source_suggestion"` and `content: {"product": ..., "reason": ...}`.
-The tool needs the `task:write` scope. If the session does not have it, continue without the suggestion.
+The tool needs the `inbox:write` scope. If the session does not have it, continue without the suggestion.
`product` is one of `logs`, `session_replay`, `error_tracking`, or `llm_analytics`.
The inbox shows the suggestion under the report's evidence with a link to that product, and hides it once the project uses the product.
diff --git a/products/signals/skills/exploring-scouts/SKILL.md b/products/signals/skills/exploring-scouts/SKILL.md
index 696858c53f5c..ea91a524a63f 100644
--- a/products/signals/skills/exploring-scouts/SKILL.md
+++ b/products/signals/skills/exploring-scouts/SKILL.md
@@ -142,7 +142,7 @@ Present it as a table the user can scan — scout, cadence, posture, last run, l
4. **Read what it remembered** — `scout-scratchpad-search` (see below).
The memory entries a scout wrote reveal the baselines and noise it has internalized about this project.
5. **Read what it was told** — `scout-notes-list {"skill_name": "signals-scout-error-tracking"}` returns the steering notes humans left for this scout plus the general fleet-wide ones — exactly what its runs read as prior context.
- Each note carries an `origin`: `human` for one left directly, or a derived kind the inbox forwarded automatically: `report_dismissal` (a dismiss/snooze note), `report_discussion` (a question typed into a report's Discuss box), `report_feedback` (a note left with a thumbs rating), `report_reviewer_correction` (someone added or removed a suggested reviewer). Derived notes expire after ~30 days, and the list hides them from a caller without report read access (`task:read`), since they quote report content, so a credential with only `signal_scout:read` sees the human notes alone.
+ Each note carries an `origin`: `human` for one left directly, or a derived kind the inbox forwarded automatically: `report_dismissal` (a dismiss/snooze note), `report_discussion` (a question typed into a report's Discuss box), `report_feedback` (a note left with a thumbs rating), `report_reviewer_correction` (someone added or removed a suggested reviewer). Derived notes expire after ~30 days, and the list hides them from a caller without report read access (`inbox:read`), since they quote report content, so a credential with only `signal_scout:read` sees the human notes alone.
Notes addressed to `pipeline:report-research` steer the report pipeline's research stage, not this scout, so they won't appear here.
A behavior change that doesn't trace to a skill edit or a scratchpad entry often traces to a note.
When asked to _steer_ a scout with a note (rather than observe), hand off to the `authoring-scouts` skill, which covers the notes channel's write side.
diff --git a/products/signals/skills/working-with-scouts/SKILL.md b/products/signals/skills/working-with-scouts/SKILL.md
index eef989ed4fdf..464980ea8795 100644
--- a/products/signals/skills/working-with-scouts/SKILL.md
+++ b/products/signals/skills/working-with-scouts/SKILL.md
@@ -93,7 +93,7 @@ Report triage mechanics live in `inbox-exploration`; what matters here is how ac
- **The dismissal note is a steering message.** On a dismiss, snooze, or restore, the `dismissal_note` is forwarded to the scout that filed the report, and every future run reads it as prior context. A `wrong_assignee` or `wrong_repo` dismissal forwards even without a note because the reason itself is routing feedback.
Write it for that reader: name the evidence that settles it ("staging traffic — hosts match `*.dev.example.com`, ignore this pattern"), not just the verdict.
A well-written dismissal is the cheapest scout edit you will ever make; a bare dismissal teaches nothing and the report comes back.
- Two caveats: forwarding is best-effort and requires the dismisser to hold scout-steering (skill-editor) access on the canonical project, and a dismissal made on a child environment's report never forwards at all; in both cases the note still lands on the report but never reaches the scout, so for a steer that must stick, confirm it arrived (`posthog:scout-notes-list`, with a credential that also holds `task:read`, since derived notes are hidden without it) or have someone authorized leave a note directly.
+ Two caveats: forwarding is best-effort and requires the dismisser to hold scout-steering (skill-editor) access on the canonical project, and a dismissal made on a child environment's report never forwards at all; in both cases the note still lands on the report but never reaches the scout, so for a steer that must stick, confirm it arrived (`posthog:scout-notes-list`, with a credential that also holds `inbox:read`, since derived notes are hidden without it) or have someone authorized leave a note directly.
The forwarded note also expires after ~30 days — it becomes durable only if the scout folds it into scratchpad memory, so a steer that must outlive that belongs up the ladder as a skill edit.
- **Three more inbox actions steer the same way.** A question typed into a report's "Discuss" box, a note left with a thumbs rating on a report, and adding or removing a suggested reviewer each also become a scout note (visible in `posthog:scout-notes-list` with an `origin` of `report_discussion`, `report_feedback`, or `report_reviewer_correction`).
A reviewer correction is the strongest routing evidence the fleet gets: it reaches the scouts that filed or edited the report and the scouts whose `reviewer:` memory names a removed login (capped at twenty targets per correction, so on a very busy report a few can miss it), so fixing a misrouted report in place teaches the fleet who owns the surface.
diff --git a/products/signals/skills/working-with-scouts/references/delegation-recipes.md b/products/signals/skills/working-with-scouts/references/delegation-recipes.md
index e94c596ecd18..a8ebad5ec180 100644
--- a/products/signals/skills/working-with-scouts/references/delegation-recipes.md
+++ b/products/signals/skills/working-with-scouts/references/delegation-recipes.md
@@ -97,7 +97,7 @@ Reports reach people via `suggested_reviewers` — the inbox floats a report to
Delivery is a config decision, not an authoring one: a surfaced report (`ready` or `pending_input`) goes to the inbox and to Slack, while a report the safety or actionability judge suppressed stays inbox-only, so a missing Slack message for a suppressed report is not a delivery failure.
1. `posthog:scout-config-update` with `output_destinations.slack`: the workspace `integration_id` plus either a `channel` or up to five `users` to DM, never both (field shapes and the threading option are in `authoring-scouts`, Run posture).
- From a scoped API key or OAuth token this write also needs `integration:read` and `task:read` (or the write scopes) alongside `signal_scout:write`; a minimally scoped credential gets a permission error.
+ From a scoped API key or OAuth token this write also needs `integration:read` and `inbox:read` (or the write scopes) alongside `signal_scout:write`; a minimally scoped credential gets a permission error.
Read the existing `output_destinations` first and send the whole object back; the update replaces it, so sending only `slack` drops an existing `webhook` pointer.
2. Slack delivery is a firehose of that one scout's output (no priority filter, no reviewer routing), so it suits a scout whose bar is already tight.
Calibrate in the inbox first, then add the destination.
diff --git a/products/tasks/backend/facade/contracts.py b/products/tasks/backend/facade/contracts.py
index 4af282628272..4fa4ac64e6a3 100644
--- a/products/tasks/backend/facade/contracts.py
+++ b/products/tasks/backend/facade/contracts.py
@@ -853,6 +853,7 @@ class TaskRunSandboxConnectionDTO:
SPACE_SETUP_SCOPES = (
"task:write",
+ "inbox:write",
"canvas:write",
"hog_flow:write",
# workflows-schedule-create and workflows-test-run require these beside hog_flow:write.
diff --git a/products/today/backend/presentation/views.py b/products/today/backend/presentation/views.py
index 0b3f9f481bd0..bda5e9d9182f 100644
--- a/products/today/backend/presentation/views.py
+++ b/products/today/backend/presentation/views.py
@@ -161,7 +161,7 @@ class TodayViewSet(TeamAndOrgViewSetMixin, viewsets.ViewSet):
detail=False,
methods=["get"],
url_path=rf"reports/(?P<report_id>{UUID_REGEX}|sample-[a-z]+)/page",
- required_scopes=["today:read", "task:read"],
+ required_scopes=["today:read", "inbox:read"],
)
def report_page(self, request: Request, report_id: str, **kwargs) -> Response:
user = cast(User, request.user)
@@ -186,7 +186,7 @@ class TodayViewSet(TeamAndOrgViewSetMixin, viewsets.ViewSet):
detail=False,
methods=["get"],
url_path=rf"reports/(?P<report_id>{UUID_REGEX})/key_clauses",
- required_scopes=["today:read", "task:read"],
+ required_scopes=["today:read", "inbox:read"],
throttle_classes=JEV_THROTTLES,
)
def key_clauses(self, request: Request, report_id: str, **kwargs) -> Response:
@@ -210,7 +210,7 @@ class TodayViewSet(TeamAndOrgViewSetMixin, viewsets.ViewSet):
detail=False,
methods=["get"],
url_path=rf"reports/(?P<report_id>{UUID_REGEX})/figure_marks",
- required_scopes=["today:read", "task:read"],
+ required_scopes=["today:read", "inbox:read"],
throttle_classes=JEV_THROTTLES,
)
def figure_marks(self, request: Request, report_id: str, **kwargs) -> Response:
diff --git a/products/today/backend/tests/test_api.py b/products/today/backend/tests/test_api.py
index ea258d766ff4..9edfb998f04d 100644
--- a/products/today/backend/tests/test_api.py
+++ b/products/today/backend/tests/test_api.py
@@ -272,7 +272,14 @@ class TestTodayAPI(TodayTeamScopedTestMixin, APIBaseTest):
[
("the page with only today", "get", f"reports/{REPORT_ID}/page", ["today:read"], status.HTTP_403_FORBIDDEN),
(
- "the page with today and signals",
+ "the page with today and inbox",
+ "get",
+ f"reports/{REPORT_ID}/page",
+ ["today:read", "inbox:read"],
+ status.HTTP_200_OK,
+ ),
+ (
+ "the page with today and the legacy task scope",
"get",
f"reports/{REPORT_ID}/page",
["today:read", "task:read"],
diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.json
index 6781798d3fc3..27e305719f9b 100644
--- a/services/mcp/schema/generated-tool-definitions.json
+++ b/services/mcp/schema/generated-tool-definitions.json
@@ -7800,7 +7800,7 @@
"feature": "signals",
"summary": "List inbox ranking outcomes",
"title": "List inbox ranking outcomes",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/ranking_outcomes/"],
"annotations": {
"destructiveHint": false,
@@ -7815,7 +7815,7 @@
"feature": "signals",
"summary": "List a report's agent run actions",
"title": "List a report's agent run actions",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{id}/actions/"],
"annotations": {
"destructiveHint": false,
@@ -7832,7 +7832,7 @@
"feature": "signals",
"summary": "Run a report action as an agent task",
"title": "Run a report action as an agent task",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/actions/run/"],
"annotations": {
"destructiveHint": true,
@@ -7849,7 +7849,7 @@
"feature": "signals",
"summary": "Append an artefact to a report",
"title": "Append an artefact to a report",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{report_id}/artefacts/"],
"annotations": {
"destructiveHint": false,
@@ -7864,7 +7864,7 @@
"feature": "signals",
"summary": "Delete an artefact",
"title": "Delete an artefact",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["DELETE /api/projects/{project_id}/signals/reports/{report_id}/artefacts/{id}/"],
"annotations": {
"destructiveHint": true,
@@ -7879,7 +7879,7 @@
"feature": "signals",
"summary": "List a report's artefacts",
"title": "List a report's artefacts",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{report_id}/artefacts/"],
"annotations": {
"destructiveHint": false,
@@ -7894,7 +7894,7 @@
"feature": "signals",
"summary": "Get a single artefact",
"title": "Get a single artefact",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{report_id}/artefacts/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -7909,7 +7909,7 @@
"feature": "signals",
"summary": "Replace an artefact's content",
"title": "Replace an artefact's content",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["PATCH /api/projects/{project_id}/signals/reports/{report_id}/artefacts/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -7939,7 +7939,7 @@
"feature": "signals",
"summary": "List a report's checks",
"title": "List a report's checks",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{report_id}/checks/"],
"annotations": {
"destructiveHint": false,
@@ -7954,7 +7954,7 @@
"feature": "signals",
"summary": "Replace a metric follow-up check",
"title": "Replace a metric follow-up check",
- "required_scopes": ["task:write", "query:read"],
+ "required_scopes": ["inbox:write", "query:read"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{report_id}/checks/{id}/replace/"],
"annotations": {
"destructiveHint": true,
@@ -7971,7 +7971,7 @@
"feature": "signals",
"summary": "Get a single check",
"title": "Get a single check",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{report_id}/checks/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -7986,7 +7986,7 @@
"feature": "signals",
"summary": "Update a report's suggested reviewers",
"title": "Update a report's suggested reviewers",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["PUT /api/projects/{project_id}/signals/reports/{id}/reviewers/"],
"annotations": {
"destructiveHint": false,
@@ -8001,7 +8001,7 @@
"feature": "signals",
"summary": "Resolve, dismiss, or snooze inbox reports in bulk",
"title": "Resolve, dismiss, or snooze inbox reports in bulk",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/bulk-state/"],
"annotations": {
"destructiveHint": true,
@@ -8016,7 +8016,7 @@
"feature": "signals",
"summary": "Update work on an inbox report",
"title": "Update work on an inbox report",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/claim/"],
"annotations": {
"destructiveHint": true,
@@ -8031,7 +8031,7 @@
"feature": "signals",
"summary": "Rate an inbox report",
"title": "Rate an inbox report",
- "required_scopes": ["task:read", "signal_scout:write", "llm_skill:write"],
+ "required_scopes": ["inbox:read", "signal_scout:write", "llm_skill:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/feedback/"],
"annotations": {
"destructiveHint": false,
@@ -8046,7 +8046,7 @@
"feature": "signals",
"summary": "Get your personal ranked inbox",
"title": "Get your personal ranked inbox",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/for_me/"],
"annotations": {
"destructiveHint": false,
@@ -8062,7 +8062,7 @@
"feature": "signals",
"summary": "Step off a report's suggested reviewers",
"title": "Step off a report's suggested reviewers",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/reviewers/me/"],
"annotations": {
"destructiveHint": false,
@@ -8077,7 +8077,7 @@
"feature": "signals",
"summary": "List inbox reports",
"title": "List inbox reports",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/"],
"annotations": {
"destructiveHint": false,
@@ -8092,7 +8092,7 @@
"feature": "signals",
"summary": "Merge duplicate reports into one",
"title": "Merge duplicate reports into one",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/merge/"],
"annotations": {
"destructiveHint": true,
@@ -8107,7 +8107,7 @@
"feature": "signals",
"summary": "Get inbox report",
"title": "Get inbox report",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8122,7 +8122,7 @@
"feature": "signals",
"summary": "Resolve, dismiss, or snooze an inbox report",
"title": "Resolve, dismiss, or snooze an inbox report",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/state/"],
"annotations": {
"destructiveHint": true,
@@ -8137,7 +8137,7 @@
"feature": "signals",
"summary": "Edit an inbox report's title or summary",
"title": "Edit an inbox report's title or summary",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["PATCH /api/projects/{project_id}/signals/reports/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8152,7 +8152,7 @@
"feature": "signals",
"summary": "Stay off automatic reviewer selection in an area",
"title": "Stay off automatic reviewer selection in an area",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reviewer_exclusions/"],
"annotations": {
"destructiveHint": false,
@@ -8168,7 +8168,7 @@
"feature": "signals",
"summary": "Get one of your reviewer exclusions",
"title": "Get one of your reviewer exclusions",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reviewer_exclusions/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8184,7 +8184,7 @@
"feature": "signals",
"summary": "List your reviewer exclusions",
"title": "List your reviewer exclusions",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reviewer_exclusions/"],
"annotations": {
"destructiveHint": false,
@@ -8200,7 +8200,7 @@
"feature": "signals",
"summary": "Revoke one of your reviewer exclusions",
"title": "Revoke one of your reviewer exclusions",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reviewer_exclusions/{id}/revoke/"],
"annotations": {
"destructiveHint": false,
@@ -8216,7 +8216,7 @@
"feature": "signals",
"summary": "Change one of your reviewer exclusions",
"title": "Change one of your reviewer exclusions",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["PATCH /api/projects/{project_id}/signals/reviewer_exclusions/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8232,7 +8232,7 @@
"feature": "signals",
"summary": "Create inbox source config",
"title": "Create inbox source config",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/source_configs/"],
"annotations": {
"destructiveHint": false,
@@ -8247,7 +8247,7 @@
"feature": "signals",
"summary": "List inbox source configs",
"title": "List inbox source configs",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/source_configs/"],
"annotations": {
"destructiveHint": false,
@@ -8262,7 +8262,7 @@
"feature": "signals",
"summary": "Update inbox source config",
"title": "Update inbox source config",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["PATCH /api/projects/{project_id}/signals/source_configs/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8277,7 +8277,7 @@
"feature": "signals",
"summary": "Get inbox source config",
"title": "Get inbox source config",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/source_configs/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8292,7 +8292,7 @@
"feature": "signals",
"summary": "Replace inbox source config",
"title": "Replace inbox source config",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["PUT /api/projects/{project_id}/signals/source_configs/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8307,7 +8307,7 @@
"feature": "signals",
"summary": "Get Self-driving steering instructions",
"title": "Get Self-driving steering instructions",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/config/"],
"annotations": {
"destructiveHint": false,
@@ -8322,7 +8322,7 @@
"feature": "signals",
"summary": "Update Self-driving steering instructions",
"title": "Update Self-driving steering instructions",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/config/"],
"annotations": {
"destructiveHint": false,
@@ -13067,12 +13067,12 @@
}
},
"scout-runs-emission-reports": {
- "description": "For a `SignalScoutRun`, return each emitted finding paired with the inbox report its signal grouped into — the reverse lookup from a scout's emission to the `SignalReport` it actually produced. One row per emission with its `finding_id`, the deterministic `source_id` (`run:<run_id>:finding:<finding_id>`), and the linked `report` (`id`, `title`, `status`) or `null` when the finding never matched a report (or the report was deleted/suppressed). Use this to see *which* findings turned into actionable reports, not just what a run surfaced (`scout-runs-emissions-list`). Requires `task:read` on top of `signal_scout:read` because it exposes report titles. Strictly team-scoped — a run UUID belonging to another team returns 404.",
+ "description": "For a `SignalScoutRun`, return each emitted finding paired with the inbox report its signal grouped into — the reverse lookup from a scout's emission to the `SignalReport` it actually produced. One row per emission with its `finding_id`, the deterministic `source_id` (`run:<run_id>:finding:<finding_id>`), and the linked `report` (`id`, `title`, `status`) or `null` when the finding never matched a report (or the report was deleted/suppressed). Use this to see *which* findings turned into actionable reports, not just what a run surfaced (`scout-runs-emissions-list`). Requires `inbox:read` on top of `signal_scout:read` because it exposes report titles. Strictly team-scoped — a run UUID belonging to another team returns 404.",
"category": "Signals",
"feature": "signals",
"summary": "List the inbox reports a scout run's findings linked to",
"title": "List the inbox reports a scout run's findings linked to",
- "required_scopes": ["signal_scout:read", "task:read"],
+ "required_scopes": ["signal_scout:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/scout/runs/{run_id}/emissions/reports/"],
"annotations": {
"destructiveHint": false,
@@ -13606,7 +13606,7 @@
"feature": "signals",
"summary": "List the inbox reports a scout run's findings linked to (deprecated)",
"title": "List the inbox reports a scout run's findings linked to (deprecated)",
- "required_scopes": ["signal_scout:read", "task:read"],
+ "required_scopes": ["signal_scout:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/scout/runs/{run_id}/emissions/reports/"],
"annotations": {
"destructiveHint": false,
@@ -15525,7 +15525,7 @@
"feature": "replay_vision",
"summary": "List observation's inbox reports",
"title": "List observation's inbox reports",
- "required_scopes": ["replay_scanner:read", "session_recording:read", "task:read"],
+ "required_scopes": ["replay_scanner:read", "session_recording:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/vision/observations/{id}/signal_reports/"],
"annotations": {
"destructiveHint": false,
@@ -15970,7 +15970,7 @@
"feature": "replay_vision",
"summary": "Get scanner scout report",
"title": "Get scanner scout report",
- "required_scopes": ["replay_scanner:read", "session_recording:read", "task:read"],
+ "required_scopes": ["replay_scanner:read", "session_recording:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/vision/scanners/{scanner_id}/scout_reports/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -15985,7 +15985,7 @@
"feature": "replay_vision",
"summary": "List scanner scout reports",
"title": "List scanner scout reports",
- "required_scopes": ["replay_scanner:read", "session_recording:read", "task:read"],
+ "required_scopes": ["replay_scanner:read", "session_recording:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/vision/scanners/{scanner_id}/scout_reports/"],
"annotations": {
"destructiveHint": false,
@@ -16031,7 +16031,7 @@
"feature": "replay_vision",
"summary": "Get scanner's self-driving outcomes",
"title": "Get scanner's self-driving outcomes",
- "required_scopes": ["replay_scanner:read", "task:read"],
+ "required_scopes": ["replay_scanner:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/vision/scanners/{id}/self_driving_stats/"],
"annotations": {
"destructiveHint": false,
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.json
index 43da4e0052cc..61182085e691 100644
--- a/services/mcp/schema/tool-definitions-all.json
+++ b/services/mcp/schema/tool-definitions-all.json
@@ -8032,7 +8032,7 @@
"feature": "signals",
"summary": "List inbox ranking outcomes",
"title": "List inbox ranking outcomes",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/ranking_outcomes/"],
"annotations": {
"destructiveHint": false,
@@ -8047,7 +8047,7 @@
"feature": "signals",
"summary": "List a report's agent run actions",
"title": "List a report's agent run actions",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{id}/actions/"],
"annotations": {
"destructiveHint": false,
@@ -8064,7 +8064,7 @@
"feature": "signals",
"summary": "Run a report action as an agent task",
"title": "Run a report action as an agent task",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/actions/run/"],
"annotations": {
"destructiveHint": true,
@@ -8081,7 +8081,7 @@
"feature": "signals",
"summary": "Append an artefact to a report",
"title": "Append an artefact to a report",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{report_id}/artefacts/"],
"annotations": {
"destructiveHint": false,
@@ -8096,7 +8096,7 @@
"feature": "signals",
"summary": "Delete an artefact",
"title": "Delete an artefact",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["DELETE /api/projects/{project_id}/signals/reports/{report_id}/artefacts/{id}/"],
"annotations": {
"destructiveHint": true,
@@ -8111,7 +8111,7 @@
"feature": "signals",
"summary": "List a report's artefacts",
"title": "List a report's artefacts",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{report_id}/artefacts/"],
"annotations": {
"destructiveHint": false,
@@ -8126,7 +8126,7 @@
"feature": "signals",
"summary": "Get a single artefact",
"title": "Get a single artefact",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{report_id}/artefacts/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8141,7 +8141,7 @@
"feature": "signals",
"summary": "Replace an artefact's content",
"title": "Replace an artefact's content",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["PATCH /api/projects/{project_id}/signals/reports/{report_id}/artefacts/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8171,7 +8171,7 @@
"feature": "signals",
"summary": "List a report's checks",
"title": "List a report's checks",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{report_id}/checks/"],
"annotations": {
"destructiveHint": false,
@@ -8186,7 +8186,7 @@
"feature": "signals",
"summary": "Replace a metric follow-up check",
"title": "Replace a metric follow-up check",
- "required_scopes": ["task:write", "query:read"],
+ "required_scopes": ["inbox:write", "query:read"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{report_id}/checks/{id}/replace/"],
"annotations": {
"destructiveHint": true,
@@ -8203,7 +8203,7 @@
"feature": "signals",
"summary": "Get a single check",
"title": "Get a single check",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{report_id}/checks/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8218,7 +8218,7 @@
"feature": "signals",
"summary": "Update a report's suggested reviewers",
"title": "Update a report's suggested reviewers",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["PUT /api/projects/{project_id}/signals/reports/{id}/reviewers/"],
"annotations": {
"destructiveHint": false,
@@ -8233,7 +8233,7 @@
"feature": "signals",
"summary": "Resolve, dismiss, or snooze inbox reports in bulk",
"title": "Resolve, dismiss, or snooze inbox reports in bulk",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/bulk-state/"],
"annotations": {
"destructiveHint": true,
@@ -8248,7 +8248,7 @@
"feature": "signals",
"summary": "Update work on an inbox report",
"title": "Update work on an inbox report",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/claim/"],
"annotations": {
"destructiveHint": true,
@@ -8263,7 +8263,7 @@
"feature": "signals",
"summary": "Rate an inbox report",
"title": "Rate an inbox report",
- "required_scopes": ["task:read", "signal_scout:write", "llm_skill:write"],
+ "required_scopes": ["inbox:read", "signal_scout:write", "llm_skill:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/feedback/"],
"annotations": {
"destructiveHint": false,
@@ -8278,7 +8278,7 @@
"feature": "signals",
"summary": "Get your personal ranked inbox",
"title": "Get your personal ranked inbox",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/for_me/"],
"annotations": {
"destructiveHint": false,
@@ -8294,7 +8294,7 @@
"feature": "signals",
"summary": "Step off a report's suggested reviewers",
"title": "Step off a report's suggested reviewers",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/reviewers/me/"],
"annotations": {
"destructiveHint": false,
@@ -8309,7 +8309,7 @@
"feature": "signals",
"summary": "List inbox reports",
"title": "List inbox reports",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/"],
"annotations": {
"destructiveHint": false,
@@ -8324,7 +8324,7 @@
"feature": "signals",
"summary": "Merge duplicate reports into one",
"title": "Merge duplicate reports into one",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/merge/"],
"annotations": {
"destructiveHint": true,
@@ -8339,7 +8339,7 @@
"feature": "signals",
"summary": "Get inbox report",
"title": "Get inbox report",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reports/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8354,7 +8354,7 @@
"feature": "signals",
"summary": "Resolve, dismiss, or snooze an inbox report",
"title": "Resolve, dismiss, or snooze an inbox report",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reports/{id}/state/"],
"annotations": {
"destructiveHint": true,
@@ -8369,7 +8369,7 @@
"feature": "signals",
"summary": "Edit an inbox report's title or summary",
"title": "Edit an inbox report's title or summary",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["PATCH /api/projects/{project_id}/signals/reports/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8384,7 +8384,7 @@
"feature": "signals",
"summary": "Stay off automatic reviewer selection in an area",
"title": "Stay off automatic reviewer selection in an area",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reviewer_exclusions/"],
"annotations": {
"destructiveHint": false,
@@ -8400,7 +8400,7 @@
"feature": "signals",
"summary": "Get one of your reviewer exclusions",
"title": "Get one of your reviewer exclusions",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reviewer_exclusions/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8416,7 +8416,7 @@
"feature": "signals",
"summary": "List your reviewer exclusions",
"title": "List your reviewer exclusions",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/reviewer_exclusions/"],
"annotations": {
"destructiveHint": false,
@@ -8432,7 +8432,7 @@
"feature": "signals",
"summary": "Revoke one of your reviewer exclusions",
"title": "Revoke one of your reviewer exclusions",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/reviewer_exclusions/{id}/revoke/"],
"annotations": {
"destructiveHint": false,
@@ -8448,7 +8448,7 @@
"feature": "signals",
"summary": "Change one of your reviewer exclusions",
"title": "Change one of your reviewer exclusions",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["PATCH /api/projects/{project_id}/signals/reviewer_exclusions/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8464,7 +8464,7 @@
"feature": "signals",
"summary": "Create inbox source config",
"title": "Create inbox source config",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/source_configs/"],
"annotations": {
"destructiveHint": false,
@@ -8479,7 +8479,7 @@
"feature": "signals",
"summary": "List inbox source configs",
"title": "List inbox source configs",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/source_configs/"],
"annotations": {
"destructiveHint": false,
@@ -8494,7 +8494,7 @@
"feature": "signals",
"summary": "Update inbox source config",
"title": "Update inbox source config",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["PATCH /api/projects/{project_id}/signals/source_configs/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8509,7 +8509,7 @@
"feature": "signals",
"summary": "Get inbox source config",
"title": "Get inbox source config",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/source_configs/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8524,7 +8524,7 @@
"feature": "signals",
"summary": "Replace inbox source config",
"title": "Replace inbox source config",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write"],
"api_operations": ["PUT /api/projects/{project_id}/signals/source_configs/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -8539,7 +8539,7 @@
"feature": "signals",
"summary": "Get Self-driving steering instructions",
"title": "Get Self-driving steering instructions",
- "required_scopes": ["task:read"],
+ "required_scopes": ["inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/config/"],
"annotations": {
"destructiveHint": false,
@@ -8554,7 +8554,7 @@
"feature": "signals",
"summary": "Update Self-driving steering instructions",
"title": "Update Self-driving steering instructions",
- "required_scopes": ["task:write"],
+ "required_scopes": ["inbox:write", "task:write"],
"api_operations": ["POST /api/projects/{project_id}/signals/config/"],
"annotations": {
"destructiveHint": false,
@@ -13768,12 +13768,12 @@
}
},
"scout-runs-emission-reports": {
- "description": "For a `SignalScoutRun`, return each emitted finding paired with the inbox report its signal grouped into — the reverse lookup from a scout's emission to the `SignalReport` it actually produced. One row per emission with its `finding_id`, the deterministic `source_id` (`run:<run_id>:finding:<finding_id>`), and the linked `report` (`id`, `title`, `status`) or `null` when the finding never matched a report (or the report was deleted/suppressed). Use this to see *which* findings turned into actionable reports, not just what a run surfaced (`scout-runs-emissions-list`). Requires `task:read` on top of `signal_scout:read` because it exposes report titles. Strictly team-scoped — a run UUID belonging to another team returns 404.",
+ "description": "For a `SignalScoutRun`, return each emitted finding paired with the inbox report its signal grouped into — the reverse lookup from a scout's emission to the `SignalReport` it actually produced. One row per emission with its `finding_id`, the deterministic `source_id` (`run:<run_id>:finding:<finding_id>`), and the linked `report` (`id`, `title`, `status`) or `null` when the finding never matched a report (or the report was deleted/suppressed). Use this to see *which* findings turned into actionable reports, not just what a run surfaced (`scout-runs-emissions-list`). Requires `inbox:read` on top of `signal_scout:read` because it exposes report titles. Strictly team-scoped — a run UUID belonging to another team returns 404.",
"category": "Signals",
"feature": "signals",
"summary": "List the inbox reports a scout run's findings linked to",
"title": "List the inbox reports a scout run's findings linked to",
- "required_scopes": ["signal_scout:read", "task:read"],
+ "required_scopes": ["signal_scout:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/scout/runs/{run_id}/emissions/reports/"],
"annotations": {
"destructiveHint": false,
@@ -14307,7 +14307,7 @@
"feature": "signals",
"summary": "List the inbox reports a scout run's findings linked to (deprecated)",
"title": "List the inbox reports a scout run's findings linked to (deprecated)",
- "required_scopes": ["signal_scout:read", "task:read"],
+ "required_scopes": ["signal_scout:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/signals/scout/runs/{run_id}/emissions/reports/"],
"annotations": {
"destructiveHint": false,
@@ -16299,7 +16299,7 @@
"feature": "replay_vision",
"summary": "List observation's inbox reports",
"title": "List observation's inbox reports",
- "required_scopes": ["replay_scanner:read", "session_recording:read", "task:read"],
+ "required_scopes": ["replay_scanner:read", "session_recording:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/vision/observations/{id}/signal_reports/"],
"annotations": {
"destructiveHint": false,
@@ -16744,7 +16744,7 @@
"feature": "replay_vision",
"summary": "Get scanner scout report",
"title": "Get scanner scout report",
- "required_scopes": ["replay_scanner:read", "session_recording:read", "task:read"],
+ "required_scopes": ["replay_scanner:read", "session_recording:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/vision/scanners/{scanner_id}/scout_reports/{id}/"],
"annotations": {
"destructiveHint": false,
@@ -16759,7 +16759,7 @@
"feature": "replay_vision",
"summary": "List scanner scout reports",
"title": "List scanner scout reports",
- "required_scopes": ["replay_scanner:read", "session_recording:read", "task:read"],
+ "required_scopes": ["replay_scanner:read", "session_recording:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/vision/scanners/{scanner_id}/scout_reports/"],
"annotations": {
"destructiveHint": false,
@@ -16805,7 +16805,7 @@
"feature": "replay_vision",
"summary": "Get scanner's self-driving outcomes",
"title": "Get scanner's self-driving outcomes",
- "required_scopes": ["replay_scanner:read", "task:read"],
+ "required_scopes": ["replay_scanner:read", "inbox:read"],
"api_operations": ["GET /api/projects/{project_id}/vision/scanners/{id}/self_driving_stats/"],
"annotations": {
"destructiveHint": false,
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 09855e480350..061fc1d7f954 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -1316,6 +1316,7 @@ export namespace Schemas {
* * `feature_flag` - feature_flag
* * `heatmap` - heatmap
* * `hog_flow` - hog_flow
+ * * `inbox` - inbox
* * `insight` - insight
* * `llm_analytics` - llm_analytics
* * `llm_playground` - llm_playground
@@ -1375,6 +1376,7 @@ export namespace Schemas {
FeatureFlag: 'feature_flag',
Heatmap: 'heatmap',
HogFlow: 'hog_flow',
+ Inbox: 'inbox',
Insight: 'insight',
LlmAnalytics: 'llm_analytics',
LlmPlayground: 'llm_playground',
@@ -1437,6 +1439,7 @@ export namespace Schemas {
* * `feature_flag` - feature_flag
* * `heatmap` - heatmap
* * `hog_flow` - hog_flow
+ * * `inbox` - inbox
* * `insight` - insight
* * `llm_analytics` - llm_analytics
* * `llm_playground` - llm_playground
@@ -1704,6 +1707,7 @@ export namespace Schemas {
* * `feature_flag` - feature_flag
* * `heatmap` - heatmap
* * `hog_flow` - hog_flow
+ * * `inbox` - inbox
* * `insight` - insight
* * `llm_analytics` - llm_analytics
* * `llm_playground` - llm_playground
@@ -1791,6 +1795,7 @@ export namespace Schemas {
* * `feature_flag` - feature_flag
* * `heatmap` - heatmap
* * `hog_flow` - hog_flow
+ * * `inbox` - inbox
* * `insight` - insight
* * `llm_analytics` - llm_analytics
* * `llm_playground` - llm_playground
diff --git a/services/mcp/src/generated/access_control/api.ts b/services/mcp/src/generated/access_control/api.ts
index 07abd4977627..f4143e1aba3b 100644
--- a/services/mcp/src/generated/access_control/api.ts
+++ b/services/mcp/src/generated/access_control/api.ts
@@ -94,6 +94,7 @@ export const OrganizationsProjectsAccessControlDefaultRulesUpdateBody = () => zo
'feature_flag',
'heatmap',
'hog_flow',
+ 'inbox',
'insight',
'llm_analytics',
'llm_playground',
@@ -125,10 +126,10 @@ export const OrganizationsProjectsAccessControlDefaultRulesUpdateBody = () => zo
'web_analytics',
])
.describe(
- '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
)
.describe(
- 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
),
resource_id: zod
.string()
@@ -264,6 +265,7 @@ export const OrganizationsProjectsAccessControlMemberRulesUpdateBody = () => zod
'feature_flag',
'heatmap',
'hog_flow',
+ 'inbox',
'insight',
'llm_analytics',
'llm_playground',
@@ -295,10 +297,10 @@ export const OrganizationsProjectsAccessControlMemberRulesUpdateBody = () => zod
'web_analytics',
])
.describe(
- '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
)
.describe(
- 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
),
resource_id: zod
.string()
@@ -435,6 +437,7 @@ export const OrganizationsProjectsAccessControlRoleRulesUpdateBody = () => zod
'feature_flag',
'heatmap',
'hog_flow',
+ 'inbox',
'insight',
'llm_analytics',
'llm_playground',
@@ -466,10 +469,10 @@ export const OrganizationsProjectsAccessControlRoleRulesUpdateBody = () => zod
'web_analytics',
])
.describe(
- '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ '\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
)
.describe(
- 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
+ 'The scope of the rule: `project` for the project itself (with the project id as `resource_id`), a resource type such as `dashboard` for the whole resource type or for one object of it, or `property_definition` for one person or event property.\n\n\* `account` - account\n\* `action` - action\n\* `activity_log` - activity_log\n\* `ai_observability_clusters` - ai_observability_clusters\n\* `business_knowledge` - business_knowledge\n\* `customer_analytics` - customer_analytics\n\* `customer_journey` - customer_journey\n\* `customer_task` - customer_task\n\* `dashboard` - dashboard\n\* `dashboard_template` - dashboard_template\n\* `data_catalog` - data_catalog\n\* `data_deletion` - data_deletion\n\* `dataset` - dataset\n\* `early_access_feature` - early_access_feature\n\* `endpoint` - endpoint\n\* `error_tracking` - error_tracking\n\* `evaluation` - evaluation\n\* `experiment` - experiment\n\* `experiment_holdout` - experiment_holdout\n\* `experiment_saved_metric` - experiment_saved_metric\n\* `export` - export\n\* `external_data_source` - external_data_source\n\* `feature_flag` - feature_flag\n\* `heatmap` - heatmap\n\* `hog_flow` - hog_flow\n\* `inbox` - inbox\n\* `insight` - insight\n\* `llm_analytics` - llm_analytics\n\* `llm_playground` - llm_playground\n\* `llm_prompt` - llm_prompt\n\* `llm_provider_key` - llm_provider_key\n\* `llm_skill` - llm_skill\n\* `logs` - logs\n\* `marketing_analytics` - marketing_analytics\n\* `mcp_analytics` - mcp_analytics\n\* `metrics` - metrics\n\* `notebook` - notebook\n\* `project` - project\n\* `property_definition` - property_definition\n\* `replay_scanner` - replay_scanner\n\* `revenue_analytics` - revenue_analytics\n\* `session_recording` - session_recording\n\* `session_recording_playlist` - session_recording_playlist\n\* `sharing_configuration` - sharing_configuration\n\* `stamphog` - stamphog\n\* `survey` - survey\n\* `tagger` - tagger\n\* `ticket` - ticket\n\* `toolbar` - toolbar\n\* `tracing` - tracing\n\* `vision_alert` - vision_alert\n\* `warehouse_objects` - warehouse_objects\n\* `warehouse_table` - warehouse_table\n\* `warehouse_view` - warehouse_view\n\* `web_analytics` - web_analytics'
),
resource_id: zod
.string()
diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.ts
index 99a267ec1454..1fb9f80d2586 100644
--- a/services/mcp/src/generated/signals/api.ts
+++ b/services/mcp/src/generated/signals/api.ts
@@ -678,7 +678,7 @@ export const SignalsReportsActionsRunCreateBody = () => zod.object({
})
/**
- * Start or update work for the current user, internal task, or external agent. Supply claim_id to resume, pull_requests to add PRs, takeover=true to explicitly take ownership, or release=true to end ownership while preserving work history and PR links.
+ * Start or update work for the current user, internal task, or external agent. Supply claim_id to resume, pull_requests to add PRs, takeover=true to explicitly take ownership, or release=true to end ownership while preserving work history and PR links. Adding PRs needs task:write as well as inbox:write.
* @summary Claim or release a signal report
*/
export const SignalsReportsClaimParams = () => zod.object({
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-default-rule-set-prepare.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-default-rule-set-prepare.json
index 4154787a2efb..994a4275415d 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-default-rule-set-prepare.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-default-rule-set-prepare.json
@@ -46,6 +46,7 @@
"feature_flag",
"heatmap",
"hog_flow",
+ "inbox",
"insight",
"llm_analytics",
"llm_playground",
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-member-rule-set-prepare.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-member-rule-set-prepare.json
index a014d3062872..da8c8da33a82 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-member-rule-set-prepare.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-member-rule-set-prepare.json
@@ -50,6 +50,7 @@
"feature_flag",
"heatmap",
"hog_flow",
+ "inbox",
"insight",
"llm_analytics",
"llm_playground",
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-role-rule-set-prepare.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-role-rule-set-prepare.json
index 044c03365766..157cd8c79881 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-role-rule-set-prepare.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/access-control-role-rule-set-prepare.json
@@ -46,6 +46,7 @@
"feature_flag",
"heatmap",
"hog_flow",
+ "inbox",
"insight",
"llm_analytics",
"llm_playground",