:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(devex): run projection outputs through the real formatters (#108412)
Julian Bez65da52d1bcb7
diff --git a/.oxfmtrc.json b/.oxfmtrc.jsonindex eb6e122ee016..5e948632f7ab 100644--- a/.oxfmtrc.json+++ b/.oxfmtrc.json@@ -148,11 +148,8 @@"services/mcp/**/generated.ts","services/mcp/src/**/*.md","services/mcp/worker-configuration.d.ts",- "frontend/src/taxonomy/core-filter-definitions-by-group.json",- "services/mcp/src/lib/trace-property-allowlist.generated.ts","posthog/cdp/filter_globals.json","posthog/emoji_search/catalog.json",- "frontend/src/lib/components/AgentObjectTags/objectKinds.generated.ts","products/review_hog/backend/reviewer/prompts/**/schema.json","**/chart/*/templates/**","products/metrics/agent/tests/**/golden/**",diff --git a/docs/published/handbook/engineering/type-system.md b/docs/published/handbook/engineering/type-system.mdindex 1181e9bfd173..6ce30d970954 100644--- a/docs/published/handbook/engineering/type-system.md+++ b/docs/published/handbook/engineering/type-system.md@@ -124,7 +124,7 @@ The field must be on an endpoint that is in the schema. A viewset action markedData rows that no endpoint serves, such as the task model catalog, go through the projection registry instead of a script of their own:-1. Write a renderer module next to the data. Its `render()` function returns the full text of each output, keyed by repo-relative path.+1. Write a renderer module next to the data. Its `render()` function returns the full text of each output, keyed by repo-relative path. The text only has to be valid: the runner formats each output with oxfmt, or with Biome under `products/desktop` and `packages/agent`, so do not add a formatter exclusion for it.2. Add an entry to `PROJECTIONS` in `tools/hogli-commands/hogli_commands/projections.py` with the renderer, its inputs and its outputs.3. Run `hogli build:projections` and commit the outputs. CI runs `hogli build:projections --check` and fails when one is out of date.diff --git a/frontend/src/lib/components/AgentObjectTags/objectKinds.generated.ts b/frontend/src/lib/components/AgentObjectTags/objectKinds.generated.tsindex c2843d936fb4..6be8ab61a215 100644--- a/frontend/src/lib/components/AgentObjectTags/objectKinds.generated.ts+++ b/frontend/src/lib/components/AgentObjectTags/objectKinds.generated.ts@@ -3,175 +3,175 @@// run `hogli build:projections` and commit the result.export interface ObjectKindData {- /** Human name of the kind, e.g. "Insight". */- kindLabel: string;- /** Product the object comes from, e.g. "Product analytics". */- source: string;- /**- * Project-relative page template where "{id}" is the URL-encoded object id,- * or null when the kind has no canonical page.- */- pathTemplate: string | null;- /**- * When set, the raw id must match for the kind to have a page at all- * (e.g. flag pages resolve by numeric id only).- */- idPattern: string | null;- /** display="block" renders as a full card on surfaces that support it. */- block: boolean;- /** The tag body is the object id itself rather than a label (hogql: the SQL). */- idIsBody: boolean;+ /** Human name of the kind, e.g. "Insight". */+ kindLabel: string+ /** Product the object comes from, e.g. "Product analytics". */+ source: string+ /**+ * Project-relative page template where "{id}" is the URL-encoded object id,+ * or null when the kind has no canonical page.+ */+ pathTemplate: string | null+ /**+ * When set, the raw id must match for the kind to have a page at all+ * (e.g. flag pages resolve by numeric id only).+ */+ idPattern: string | null+ /** display="block" renders as a full card on surfaces that support it. */+ block: boolean+ /** The tag body is the object id itself rather than a label (hogql: the SQL). */+ idIsBody: boolean}export const OBJECT_KIND_DATA = {- insight: {- kindLabel: "Insight",- source: "Product analytics",- pathTemplate: "/insights/{id}",- idPattern: null,- block: true,- idIsBody: false,- },- hogql: {- kindLabel: "SQL query",- source: "SQL editor",- pathTemplate: "/sql?open_query={id}",- idPattern: null,- block: true,- idIsBody: true,- },- dashboard: {- kindLabel: "Dashboard",- source: "Product analytics",- pathTemplate: "/dashboard/{id}",- idPattern: null,- block: false,- idIsBody: false,- },- error: {- kindLabel: "Error issue",- source: "Error tracking",- pathTemplate: "/error_tracking/{id}",- idPattern: null,- block: false,- idIsBody: false,- },- replay: {- kindLabel: "Session replay",- source: "Session replay",- pathTemplate: "/replay/{id}",- idPattern: null,- block: true,- idIsBody: false,- },- flag: {- kindLabel: "Feature flag",- source: "Feature flags",- pathTemplate: "/feature_flags/{id}",- idPattern: "^\\d+$",- block: false,- idIsBody: false,- },- experiment: {- kindLabel: "Experiment",- source: "Experiments",- pathTemplate: "/experiments/{id}",- idPattern: null,- block: false,- idIsBody: false,- },- survey: {- kindLabel: "Survey",- source: "Surveys",- pathTemplate: "/surveys/{id}",- idPattern: null,- block: false,- idIsBody: false,- },- ticket: {- kindLabel: "Support tickets",- source: "Conversations",- pathTemplate: "/support/tickets/{id}",- idPattern: null,- block: false,- idIsBody: false,- },- report: {- kindLabel: "Inbox report",- source: "Inbox",- pathTemplate: "/inbox/{id}",- idPattern: null,- block: false,- idIsBody: false,- },- trace: {- kindLabel: "LLM trace",- source: "AI observability",- pathTemplate: "/ai-observability/traces/{id}",- idPattern: null,- block: false,- idIsBody: false,- },- eval: {- kindLabel: "Evaluation",- source: "AI evals",- pathTemplate: "/ai-evals/evaluations/{id}",- idPattern: null,- block: false,- idIsBody: false,- },- event: {- kindLabel: "Events",- source: "Product analytics",- pathTemplate: "/data-management/events/{id}",- idPattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F-]{27,}$",- block: false,- idIsBody: false,- },- cohort: {- kindLabel: "Cohort",- source: "Product analytics",- pathTemplate: "/cohorts/{id}",- idPattern: null,- block: false,- idIsBody: false,- },- action: {- kindLabel: "Action",- source: "Product analytics",- pathTemplate: "/data-management/actions/{id}",- idPattern: null,- block: false,- idIsBody: false,- },- person: {- kindLabel: "Person",- source: "Product analytics",- pathTemplate: "/persons/{id}",- idPattern: null,- block: false,- idIsBody: false,- },-} satisfies Record<string, ObjectKindData>;+ insight: {+ kindLabel: 'Insight',+ source: 'Product analytics',+ pathTemplate: '/insights/{id}',+ idPattern: null,+ block: true,+ idIsBody: false,+ },+ hogql: {+ kindLabel: 'SQL query',+ source: 'SQL editor',+ pathTemplate: '/sql?open_query={id}',+ idPattern: null,+ block: true,+ idIsBody: true,+ },+ dashboard: {+ kindLabel: 'Dashboard',+ source: 'Product analytics',+ pathTemplate: '/dashboard/{id}',+ idPattern: null,+ block: false,+ idIsBody: false,+ },+ error: {+ kindLabel: 'Error issue',+ source: 'Error tracking',+ pathTemplate: '/error_tracking/{id}',+ idPattern: null,+ block: false,+ idIsBody: false,+ },+ replay: {+ kindLabel: 'Session replay',+ source: 'Session replay',+ pathTemplate: '/replay/{id}',+ idPattern: null,+ block: true,+ idIsBody: false,+ },+ flag: {+ kindLabel: 'Feature flag',+ source: 'Feature flags',+ pathTemplate: '/feature_flags/{id}',+ idPattern: '^\\d+$',+ block: false,+ idIsBody: false,+ },+ experiment: {+ kindLabel: 'Experiment',+ source: 'Experiments',+ pathTemplate: '/experiments/{id}',+ idPattern: null,+ block: false,+ idIsBody: false,+ },+ survey: {+ kindLabel: 'Survey',+ source: 'Surveys',+ pathTemplate: '/surveys/{id}',+ idPattern: null,+ block: false,+ idIsBody: false,+ },+ ticket: {+ kindLabel: 'Support tickets',+ source: 'Conversations',+ pathTemplate: '/support/tickets/{id}',+ idPattern: null,+ block: false,+ idIsBody: false,+ },+ report: {+ kindLabel: 'Inbox report',+ source: 'Inbox',+ pathTemplate: '/inbox/{id}',+ idPattern: null,+ block: false,+ idIsBody: false,+ },+ trace: {+ kindLabel: 'LLM trace',+ source: 'AI observability',+ pathTemplate: '/ai-observability/traces/{id}',+ idPattern: null,+ block: false,+ idIsBody: false,+ },+ eval: {+ kindLabel: 'Evaluation',+ source: 'AI evals',+ pathTemplate: '/ai-evals/evaluations/{id}',+ idPattern: null,+ block: false,+ idIsBody: false,+ },+ event: {+ kindLabel: 'Events',+ source: 'Product analytics',+ pathTemplate: '/data-management/events/{id}',+ idPattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F-]{27,}$',+ block: false,+ idIsBody: false,+ },+ cohort: {+ kindLabel: 'Cohort',+ source: 'Product analytics',+ pathTemplate: '/cohorts/{id}',+ idPattern: null,+ block: false,+ idIsBody: false,+ },+ action: {+ kindLabel: 'Action',+ source: 'Product analytics',+ pathTemplate: '/data-management/actions/{id}',+ idPattern: null,+ block: false,+ idIsBody: false,+ },+ person: {+ kindLabel: 'Person',+ source: 'Product analytics',+ pathTemplate: '/persons/{id}',+ idPattern: null,+ block: false,+ idIsBody: false,+ },+} satisfies Record<string, ObjectKindData>-export type ObjectKindName = keyof typeof OBJECT_KIND_DATA;+export type ObjectKindName = keyof typeof OBJECT_KIND_DATA/** Alternate tag names agents plausibly write, mapped to registry kinds. */export const OBJECT_KIND_ALIASES: Record<string, string> = {- "session-replay": "replay",- "session_replay": "replay",- "recording": "replay",- "feature-flag": "flag",- "feature_flag": "flag",- "sql": "hogql",-};+ 'session-replay': 'replay',+ session_replay: 'replay',+ recording: 'replay',+ 'feature-flag': 'flag',+ feature_flag: 'flag',+ sql: 'hogql',+}/** Rendering fallback for a tag whose kind nobody registered. */export const FALLBACK_OBJECT_KIND_DATA: ObjectKindData = {- kindLabel: "Evidence",- source: "PostHog",- pathTemplate: null,- idPattern: null,- block: false,- idIsBody: false,-};+ kindLabel: 'Evidence',+ source: 'PostHog',+ pathTemplate: null,+ idPattern: null,+ block: false,+ idIsBody: false,+}diff --git a/frontend/src/taxonomy/core-filter-definitions-by-group.json b/frontend/src/taxonomy/core-filter-definitions-by-group.jsonindex 73abca3f1ed3..71c7b0bc2c13 100644--- a/frontend/src/taxonomy/core-filter-definitions-by-group.json+++ b/frontend/src/taxonomy/core-filter-definitions-by-group.json@@ -3,27 +3,17 @@"elements": {"href": {"description": "Filter on the `href` attribute of the element.",- "examples": [- "https://posthog.com/about"- ],+ "examples": ["https://posthog.com/about"],"label": "Target (href)"},"selector": {"description": "Select any element by CSS selector.",- "examples": [- "div > a",- "table td:nth-child(2)",- ".my-class"- ],+ "examples": ["div > a", "table td:nth-child(2)", ".my-class"],"label": "CSS selector"},"tag_name": {"description": "HTML tag name of the element which you want to filter.",- "examples": [- "a",- "button",- "input"- ],+ "examples": ["a", "button", "input"],"label": "Tag name"},"text": {@@ -57,43 +47,31 @@"event_metadata": {"distinct_id": {"description": "The current distinct ID of the user.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Distinct ID"},"event": {"description": "The name of the event.",- "examples": [- "$pageview"- ],+ "examples": ["$pageview"],"ignored_in_assistant": true,"label": "Event","system": true},"person_id": {"description": "The ID of the person, depending on the person properties mode.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Person ID"},"person_mode": {"description": "The person mode determined during ingestion: full (identified user with properties), propertyless (anonymous user), or force_upgrade (anonymous event linked to an already identified user). Used in usage reports.",- "examples": [- "full",- "propertyless",- "force_upgrade"- ],+ "examples": ["full", "propertyless", "force_upgrade"],"ignored_in_assistant": true,"label": "Person mode","system": true},"timestamp": {"description": "Time the event happened.",- "examples": [- "2023-05-20T15:30:00Z"- ],+ "examples": ["2023-05-20T15:30:00Z"],"ignored_in_assistant": true,"label": "Timestamp","system": true@@ -106,48 +84,35 @@},"$active_feature_flags": {"description": "Keys of the feature flags that were active while this event was sent.",- "examples": [- "['beta-feature']"- ],+ "examples": ["['beta-feature']"],"label": "Active feature flags"},"$ai_agent_name": {"description": "The name of the AI agent that produced this event.",- "examples": [- "research_agent",- "support_bot"- ],+ "examples": ["research_agent", "support_bot"],"label": "AI agent name (LLM)"},"$ai_audio_cost_usd": {"description": "The cost in USD of the audio tokens for this LLM request.",- "examples": [- 0.0012- ],+ "examples": [0.0012],"label": "AI audio cost USD (LLM)","type": "Numeric"},"$ai_audio_input_tokens": {"description": "The number of audio tokens in the input sent to the LLM.",- "examples": [- 64- ],+ "examples": [64],"label": "AI audio input tokens (LLM)","type": "Numeric"},"$ai_audio_output_tokens": {"description": "The number of audio tokens generated by the LLM.",- "examples": [- 64- ],+ "examples": [64],"label": "AI audio output tokens (LLM)","type": "Numeric"},"$ai_base_url": {"description": "The base URL of the request made to the LLM API.",- "examples": [- "https://api.openai.com/v1/"- ],+ "examples": ["https://api.openai.com/v1/"],"label": "AI base URL (LLM)"},"$ai_billable": {@@ -157,218 +122,145 @@},"$ai_blob_bytes": {"description": "Total decoded size in bytes of the large binary payloads in this call.",- "examples": [- 245760- ],+ "examples": [245760],"label": "AI binary payload size (LLM)","type": "Numeric"},"$ai_blob_count": {"description": "Number of large binary payloads (images, audio, documents, or other base64 content) in this call.",- "examples": [- 2- ],+ "examples": [2],"label": "AI binary payload count (LLM)","type": "Numeric"},"$ai_cache_creation_1h_input_tokens": {"description": "The number of tokens created in the 1-hour prompt cache (Anthropic only).",- "examples": [- 23- ],+ "examples": [23],"label": "AI 1-hour cache creation input tokens (LLM)","type": "Numeric"},"$ai_cache_creation_5m_input_tokens": {"description": "The number of tokens created in the 5-minute prompt cache (Anthropic only).",- "examples": [- 23- ],+ "examples": [23],"label": "AI 5-minute cache creation input tokens (LLM)","type": "Numeric"},"$ai_cache_creation_input_tokens": {"description": "The number of tokens created in the cache for the input prompt.",- "examples": [- 23- ],+ "examples": [23],"label": "AI cache creation input tokens (LLM)"},"$ai_cache_read_audio_tokens": {"description": "The number of audio tokens read from the prompt cache.",- "examples": [- 16- ],+ "examples": [16],"label": "AI cache read audio tokens (LLM)","type": "Numeric"},"$ai_cache_read_input_tokens": {"description": "The number of tokens read from the cache for the input prompt.",- "examples": [- 23- ],+ "examples": [23],"label": "AI cache read input tokens (LLM)"},"$ai_cache_read_token_price": {"description": "The price per token read from the prompt cache.",- "examples": [- 3e-07- ],+ "examples": [3e-7],"label": "AI cache read token price (LLM)","type": "Numeric"},"$ai_cache_reporting_exclusive": {"description": "Whether cache tokens are excluded from the input token count. When true, cache tokens are separate from input tokens (Anthropic-style). When false, input tokens already include cache tokens. Auto-detected from provider when not set explicitly.",- "examples": [- true- ],+ "examples": [true],"label": "AI cache reporting exclusive (LLM)"},"$ai_cache_write_1h_token_price": {"description": "The price per token written to the 1-hour prompt cache. Set this to override PostHog's cost calculation for 1-hour cache writes.",- "examples": [- 6e-06- ],+ "examples": [6e-6],"label": "AI 1-hour cache write token price (LLM)","type": "Numeric"},"$ai_cache_write_token_price": {"description": "The price per token written to the prompt cache.",- "examples": [- 3.75e-06- ],+ "examples": [3.75e-6],"label": "AI cache write token price (LLM)","type": "Numeric"},"$ai_cost_model_provider": {"description": "The provider used to look up the cost for this model.",- "examples": [- "openai",- "anthropic",- "custom"- ],+ "examples": ["openai", "anthropic", "custom"],"label": "AI cost model provider (LLM)"},"$ai_cost_model_source": {"description": "Where the cost data for this model was sourced from.",- "examples": [- "openrouter",- "manual",- "custom",- "passthrough"- ],+ "examples": ["openrouter", "manual", "custom", "passthrough"],"label": "AI cost model source (LLM)"},"$ai_cost_passthrough": {"description": "Set this to keep the reported total cost and skip PostHog's token-based estimate. Use it when the provider reports an authoritative cost, such as an LLM gateway. The input and output cost split is left unset.",- "examples": [- true- ],+ "examples": [true],"label": "AI cost passthrough (LLM)"},"$ai_error": {"description": "The error message from a failed AI event.",- "examples": [- "Rate limit exceeded",- "Invalid API key"- ],+ "examples": ["Rate limit exceeded", "Invalid API key"],"label": "AI Error (LLM)"},"$ai_error_normalized": {"description": "A normalized version of the AI error message for grouping similar errors.",- "examples": [- "rate_limit_exceeded",- "invalid_api_key"- ],+ "examples": ["rate_limit_exceeded", "invalid_api_key"],"label": "AI Error Normalized (LLM)"},"$ai_error_type": {"description": "The type or class of the error from a failed AI event.",- "examples": [- "RateLimitError",- "AuthenticationError"- ],+ "examples": ["RateLimitError", "AuthenticationError"],"label": "AI Error Type (LLM)"},"$ai_eval_source": {"description": "The source that triggered this evaluation.",- "examples": [- "signals-grouping",- "sandboxed-agent",- "one-shot"- ],+ "examples": ["signals-grouping", "sandboxed-agent", "one-shot"],"label": "AI eval source (LLM)"},"$ai_evaluation_allows_na": {"description": "Whether the evaluation allows N/A responses when the criteria doesn't apply.",- "examples": [- true,- false- ],+ "examples": [true, false],"label": "AI Evaluation Allows N/A (LLM)"},"$ai_evaluation_applicable": {"description": "Whether the evaluation criteria was applicable to this generation (only present when N/A is allowed).",- "examples": [- true,- false- ],+ "examples": [true, false],"label": "AI Evaluation Applicable (LLM)"},"$ai_evaluation_categorical_result": {"description": "The category keys returned by an online evaluation. An empty list is an applicable result with no matching categories.",- "examples": [- "[\"resolved\"]",- "[\"fast\", \"reliable\"]",- "[]"- ],+ "examples": ["[\"resolved\"]", "[\"fast\", \"reliable\"]", "[]"],"label": "AI evaluation categorical result"},"$ai_evaluation_id": {"description": "The unique identifier of the evaluation configuration used to judge the AI event.",- "examples": [- "550e8400-e29b-41d4-a716-446655440000"- ],+ "examples": ["550e8400-e29b-41d4-a716-446655440000"],"label": "AI Evaluation ID (LLM)"},"$ai_evaluation_key_id": {"description": "The ID of the LLM provider key used for the evaluation.",- "examples": [- "550e8400-e29b-41d4-a716-446655440000"- ],+ "examples": ["550e8400-e29b-41d4-a716-446655440000"],"label": "AI Evaluation Key ID (LLM)"},"$ai_evaluation_key_type": {"description": "The type of API key used for the evaluation (byok = user's own key, posthog = PostHog default).",- "examples": [- "byok",- "posthog"- ],+ "examples": ["byok", "posthog"],"label": "AI Evaluation Key Type (LLM)"},"$ai_evaluation_model": {"description": "The LLM model used as the judge for the evaluation.",- "examples": [- "gpt-4",- "claude-3-opus"- ],+ "examples": ["gpt-4", "claude-3-opus"],"label": "AI Evaluation Model (LLM)"},"$ai_evaluation_name": {"description": "The name of the evaluation configuration used.",- "examples": [- "Factual accuracy check",- "Response relevance"- ],+ "examples": ["Factual accuracy check", "Response relevance"],"label": "AI Evaluation Name (LLM)"},"$ai_evaluation_numeric_result": {"description": "The raw numeric score returned by an online evaluation.",- "examples": [- 0,- 0.75,- 10- ],+ "examples": [0, 0.75, 10],"label": "AI evaluation numeric result","type": "Numeric"},@@ -384,58 +276,38 @@},"$ai_evaluation_probability": {"description": "The probability of a true verdict for a boolean evaluation.",- "examples": [- 0.9- ],+ "examples": [0.9],"label": "AI evaluation probability","type": "Numeric"},"$ai_evaluation_provider": {"description": "The LLM provider used as the judge (e.g., openai, anthropic, gemini).",- "examples": [- "openai",- "anthropic",- "gemini"- ],+ "examples": ["openai", "anthropic", "gemini"],"label": "AI Evaluation Provider (LLM)"},"$ai_evaluation_reasoning": {"description": "The LLM's explanation for why the evaluation passed or failed.",- "examples": [- "The response accurately addresses the query",- "The output contains factual inaccuracies"- ],+ "examples": ["The response accurately addresses the query", "The output contains factual inaccuracies"],"label": "AI Evaluation Reasoning (LLM)"},"$ai_evaluation_result": {"description": "The boolean verdict of the evaluation (true = pass, false = fail).",- "examples": [- true,- false- ],+ "examples": [true, false],"label": "AI Evaluation Result (LLM)"},"$ai_evaluation_runtime": {"description": "The runtime used to execute the evaluation (e.g., llm_judge for LLM-based, hog for code-based).",- "examples": [- "llm_judge",- "hog"- ],+ "examples": ["llm_judge", "hog"],"label": "AI Evaluation Runtime (LLM)"},"$ai_evaluation_start_time": {"description": "The timestamp when the evaluation started executing.",- "examples": [- "2025-01-15T10:30:00Z"- ],+ "examples": ["2025-01-15T10:30:00Z"],"label": "AI Evaluation Start Time (LLM)"},"$ai_evaluation_type": {"description": "The type of evaluation that was run.",- "examples": [- "llm_judge",- "hog"- ],+ "examples": ["llm_judge", "hog"],"label": "AI evaluation type (LLM)"},"$ai_expected": {@@ -460,87 +332,61 @@},"$ai_feedback_text": {"description": "The text provided by the user for feedback on the LLM trace.",- "examples": [- "\"The response was helpful, but it did not use the provided context.\""- ],+ "examples": ["\"The response was helpful, but it did not use the provided context.\""],"label": "AI Feedback Text (LLM)"},"$ai_framework": {"description": "The AI framework used to produce this event.",- "examples": [- "langchain",- "llamaindex",- "openai"- ],+ "examples": ["langchain", "llamaindex", "openai"],"label": "AI framework (LLM)"},"$ai_git_branch": {"description": "The git branch checked out when the AI generation ran.",- "examples": [- "feat/my-feature"- ],+ "examples": ["feat/my-feature"],"label": "AI git branch"},"$ai_git_repo": {"description": "The repository that AI interacted with, as owner/name.",- "examples": [- "PostHog/posthog"- ],+ "examples": ["PostHog/posthog"],"label": "AI git repository"},"$ai_http_status": {"description": "The HTTP status code of the request made to the LLM API.",- "examples": [- 200,- 429- ],+ "examples": [200, 429],"label": "AI HTTP status (LLM)"},"$ai_image_cost_usd": {"description": "The cost in USD of the image tokens for this LLM request.",- "examples": [- 0.004- ],+ "examples": [0.004],"label": "AI image cost USD (LLM)","type": "Numeric"},"$ai_image_input_tokens": {"description": "The number of image tokens in the input sent to the LLM.",- "examples": [- 256- ],+ "examples": [256],"label": "AI image input tokens (LLM)","type": "Numeric"},"$ai_image_output_tokens": {"description": "The number of image tokens generated by the LLM.",- "examples": [- 256- ],+ "examples": [256],"label": "AI image output tokens (LLM)","type": "Numeric"},"$ai_ingestion_source": {"description": "How the LLM analytics event was ingested.",- "examples": [- "otel",- "sdk"- ],+ "examples": ["otel", "sdk"],"label": "AI ingestion source (LLM)","type": "String"},"$ai_input": {"description": "The input JSON that was sent to the LLM API.",- "examples": [- "{\"content\": \"Explain quantum computing in simple terms.\", \"role\": \"user\"}"- ],+ "examples": ["{\"content\": \"Explain quantum computing in simple terms.\", \"role\": \"user\"}"],"label": "AI input (LLM)"},"$ai_input_cost_usd": {"description": "The cost in USD of the input tokens sent to the LLM API.",- "examples": [- 0.0017- ],+ "examples": [0.0017],"label": "AI input cost USD (LLM)"},"$ai_input_state": {@@ -549,39 +395,28 @@},"$ai_input_token_price": {"description": "The price per input token used to compute the input cost. Set this to override PostHog's cost calculation.",- "examples": [- 3e-06- ],+ "examples": [3e-6],"label": "AI input token price (LLM)","type": "Numeric"},"$ai_input_tokens": {"description": "The number of tokens in the input prompt that was sent to the LLM API.",- "examples": [- 23- ],+ "examples": [23],"label": "AI input tokens (LLM)"},"$ai_is_error": {"description": "Whether this AI event resulted in an error.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "AI Is Error (LLM)"},"$ai_latency": {"description": "The latency of the request made to the LLM API, in seconds.",- "examples": [- 0.361- ],+ "examples": [0.361],"label": "AI latency (LLM)"},"$ai_lib": {"description": "The name of the SDK or library that sent this AI event.",- "examples": [- "posthog-python"- ],+ "examples": ["posthog-python"],"label": "AI library (LLM)","system": true},@@ -592,27 +427,18 @@},"$ai_max_tokens": {"description": "The maximum number of tokens the model was allowed to generate.",- "examples": [- 1024,- 4096- ],+ "examples": [1024, 4096],"label": "AI max tokens (LLM)","type": "Numeric"},"$ai_metric_name": {"description": "The name assigned to the metric used to evaluate the LLM trace.",- "examples": [- "rating",- "accuracy"- ],+ "examples": ["rating", "accuracy"],"label": "AI Metric Name (LLM)"},"$ai_metric_value": {"description": "The value assigned to the metric used to evaluate the LLM trace.",- "examples": [- "negative",- "95"- ],+ "examples": ["negative", "95"],"label": "AI Metric Value (LLM)"},"$ai_metric_version": {@@ -621,23 +447,17 @@},"$ai_model": {"description": "The model used to generate the output from the LLM API.",- "examples": [- "gpt-4o-mini"- ],+ "examples": ["gpt-4o-mini"],"label": "AI model (LLM)"},"$ai_model_cost_used": {"description": "The model identifier used for cost calculation. May differ from the requested model when a variant or alias is resolved.",- "examples": [- "openai/gpt-4o-mini"- ],+ "examples": ["openai/gpt-4o-mini"],"label": "AI model cost used (LLM)"},"$ai_model_parameters": {"description": "The parameters used to configure the model in the LLM API, in JSON.",- "examples": [- "{\"temperature\": 0.5, \"max_tokens\": 50}"- ],+ "examples": ["{\"temperature\": 0.5, \"max_tokens\": 50}"],"label": "AI model parameters (LLM)"},"$ai_output": {@@ -653,9 +473,7 @@},"$ai_output_cost_usd": {"description": "The cost in USD of the output tokens received from the LLM API.",- "examples": [- 0.0024- ],+ "examples": [0.0024],"label": "AI output cost USD (LLM)"},"$ai_output_state": {@@ -664,24 +482,18 @@},"$ai_output_token_price": {"description": "The price per output token used to compute the output cost. Set this to override PostHog's cost calculation.",- "examples": [- 1.5e-05- ],+ "examples": [1.5e-5],"label": "AI output token price (LLM)","type": "Numeric"},"$ai_output_tokens": {"description": "The number of tokens in the output from the LLM API.",- "examples": [- 23- ],+ "examples": [23],"label": "AI output tokens (LLM)"},"$ai_parent_id": {"description": "The parent span ID of a span or generation, used to group a trace into a tree view.",- "examples": [- "bdf42359-9364-4db7-8958-c001f28c9255"- ],+ "examples": ["bdf42359-9364-4db7-8958-c001f28c9255"],"label": "AI Parent ID (LLM)"},"$ai_project_name": {@@ -690,17 +502,13 @@},"$ai_prompt_name": {"description": "The name of the managed prompt used for this LLM request.",- "examples": [- "support-classifier"- ],+ "examples": ["support-classifier"],"label": "AI prompt name (LLM)","type": "String"},"$ai_prompt_version": {"description": "The version of the managed prompt used for this LLM request.",- "examples": [- "3"- ],+ "examples": ["3"],"label": "AI prompt version (LLM)","type": "String"},@@ -711,9 +519,7 @@},"$ai_provider": {"description": "The provider of the AI model used to generate the output from the LLM API.",- "examples": [- "openai"- ],+ "examples": ["openai"],"label": "AI Provider (LLM)"},"$ai_reasoning": {@@ -723,48 +529,34 @@},"$ai_reasoning_tokens": {"description": "The number of tokens in the reasoning output from the LLM API.",- "examples": [- 23- ],+ "examples": [23],"label": "AI reasoning tokens (LLM)"},"$ai_request_cost_usd": {"description": "The per-request cost in USD charged by the LLM API, independent of token usage.",- "examples": [- 0.005- ],+ "examples": [0.005],"label": "AI request cost USD (LLM)"},"$ai_request_count": {"description": "The number of requests made to the LLM provider for this generation.",- "examples": [- 1- ],+ "examples": [1],"label": "AI request count (LLM)","type": "Numeric"},"$ai_request_price": {"description": "The flat per-request price charged by the LLM provider, independent of token usage.",- "examples": [- 0.0001- ],+ "examples": [0.0001],"label": "AI request price (LLM)","type": "Numeric"},"$ai_request_url": {"description": "The full URL of the request made to the LLM API.",- "examples": [- "https://api.openai.com/v1/chat/completions"- ],+ "examples": ["https://api.openai.com/v1/chat/completions"],"label": "AI Request URL (LLM)"},"$ai_result_type": {"description": "The type of result for this evaluation metric.",- "examples": [- "binary",- "numeric",- "categorical"- ],+ "examples": ["binary", "numeric", "categorical"],"label": "AI result type (LLM)"},"$ai_score": {@@ -784,199 +576,130 @@},"$ai_session_id": {"description": "Groups related traces together in a session (e.g., a conversation or workflow). One session can contain many traces.",- "examples": [- "session-abc-123",- "conv-user-456"- ],+ "examples": ["session-abc-123", "conv-user-456"],"label": "AI Session ID (LLM)"},"$ai_span_id": {"description": "The unique identifier for a LLM trace, generation, or span.",- "examples": [- "bdf42359-9364-4db7-8958-c001f28c9255"- ],+ "examples": ["bdf42359-9364-4db7-8958-c001f28c9255"],"label": "AI Span ID (LLM)"},"$ai_span_name": {"description": "The name given to this LLM trace, generation, or span.",- "examples": [- "summarize_text"- ],+ "examples": ["summarize_text"],"label": "AI Span Name (LLM)"},"$ai_span_type": {"description": "The type of this span in the AI trace tree.",- "examples": [- "agent",- "tool",- "chain",- "retriever"- ],+ "examples": ["agent", "tool", "chain", "retriever"],"label": "AI span type (LLM)"},"$ai_status": {"description": "The status of this evaluation.",- "examples": [- "ok",- "error"- ],+ "examples": ["ok", "error"],"label": "AI status (LLM)"},"$ai_stop_reason": {"description": "The reason the LLM stopped generating tokens.",- "examples": [- "end_turn",- "max_tokens",- "stop_sequence"- ],+ "examples": ["end_turn", "max_tokens", "stop_sequence"],"label": "AI stop reason (LLM)"},"$ai_stream": {"description": "Whether the response from the LLM API was streamed.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "AI stream (LLM)"},"$ai_tag_count": {"description": "The number of tags assigned to the AI event.",- "examples": [- 1,- 3- ],+ "examples": [1, 3],"label": "AI Tag Count (LLM)"},"$ai_tag_reasoning": {"description": "The LLM's explanation for why it assigned the selected tags.",- "examples": [- "The generation discussed billing and feature flag configuration"- ],+ "examples": ["The generation discussed billing and feature flag configuration"],"label": "AI Tag Reasoning (LLM)"},"$ai_tagger_id": {"description": "The unique identifier of the tagger configuration used to classify the AI event.",- "examples": [- "550e8400-e29b-41d4-a716-446655440000"- ],+ "examples": ["550e8400-e29b-41d4-a716-446655440000"],"label": "AI Tagger ID (LLM)"},"$ai_tagger_key_id": {"description": "The ID of the LLM provider key used for the tagger.",- "examples": [- "550e8400-e29b-41d4-a716-446655440000"- ],+ "examples": ["550e8400-e29b-41d4-a716-446655440000"],"label": "AI Tagger Key ID (LLM)"},"$ai_tagger_key_type": {"description": "The type of API key used for the tagger (byok = user's own key, posthog = PostHog default).",- "examples": [- "byok",- "posthog"- ],+ "examples": ["byok", "posthog"],"label": "AI Tagger Key Type (LLM)"},"$ai_tagger_name": {"description": "The name of the tagger configuration used.",- "examples": [- "Product feature tagger",- "Intent classifier"- ],+ "examples": ["Product feature tagger", "Intent classifier"],"label": "AI Tagger Name (LLM)"},"$ai_tagger_start_time": {"description": "The timestamp when the tagger started executing.",- "examples": [- "2025-01-15T10:30:00Z"- ],+ "examples": ["2025-01-15T10:30:00Z"],"label": "AI Tagger Start Time (LLM)"},"$ai_tags": {"description": "The list of tags assigned to the AI event by the tagger.",- "examples": [- "billing",- "feature-flags",- "onboarding"- ],+ "examples": ["billing", "feature-flags", "onboarding"],"label": "AI Tags (LLM)"},"$ai_target_event_id": {"description": "Deprecated \u2014 use $ai_target_id with $ai_target_type instead. The unique identifier of the event being evaluated.",- "examples": [- "c9222e05-8708-41b8-98ea-d4a21849e761"- ],+ "examples": ["c9222e05-8708-41b8-98ea-d4a21849e761"],"label": "AI Target Event ID (LLM)"},"$ai_target_event_type": {"description": "Deprecated \u2014 use $ai_target_type instead. The type of event being evaluated (e.g., $ai_generation).",- "examples": [- "$ai_generation",- "$ai_span"- ],+ "examples": ["$ai_generation", "$ai_span"],"label": "AI Target Event Type (LLM)"},"$ai_target_id": {"description": "Identifier of the entity this evaluation targets. Pair with $ai_target_type to know which ID space it belongs to (event UUID, trace ID, etc.).",- "examples": [- "c9222e05-8708-41b8-98ea-d4a21849e761"- ],+ "examples": ["c9222e05-8708-41b8-98ea-d4a21849e761"],"label": "AI Target ID (LLM)"},"$ai_target_type": {"description": "ID space of $ai_target_id. `generation_uuid` resolves against `events.uuid`, `trace_id` resolves against the `$ai_trace_id` property, and `session_id` resolves against the `$ai_session_id` property.",- "examples": [- "generation_uuid",- "trace_id",- "session_id"- ],+ "examples": ["generation_uuid", "trace_id", "session_id"],"label": "AI Target Type (LLM)"},"$ai_temperature": {"description": "The temperature parameter used in the request to the LLM API.",- "examples": [- 0.7,- 1.0- ],+ "examples": [0.7, 1.0],"label": "AI temperature (LLM)"},"$ai_text_input_tokens": {"description": "The number of text tokens in the input prompt sent to the LLM.",- "examples": [- 128- ],+ "examples": [128],"label": "AI text input tokens (LLM)","type": "Numeric"},"$ai_text_output_tokens": {"description": "The number of text tokens generated by the LLM.",- "examples": [- 42- ],+ "examples": [42],"label": "AI text output tokens (LLM)","type": "Numeric"},"$ai_time_to_first_token": {"description": "The time in seconds from request start until the first token was received. Only applicable for streaming responses.",- "examples": [- 0.125,- 0.5- ],+ "examples": [0.125, 0.5],"label": "AI time to first token (LLM)"},"$ai_tokens_source": {"description": "The source of the token count data for this generation.",- "examples": [- "api_response",- "estimated"- ],+ "examples": ["api_response", "estimated"],"label": "AI tokens source (LLM)","system": true},"$ai_tool_call_count": {"description": "The number of tool calls made by the LLM in this generation.",- "examples": [- "2"- ],+ "examples": ["2"],"label": "AI Tool Call Count (LLM)"},"$ai_tools": {@@ -988,16 +711,12 @@},"$ai_tools_called": {"description": "The names of tools called by the LLM in this generation.",- "examples": [- "get_weather,search_docs"- ],+ "examples": ["get_weather,search_docs"],"label": "AI Tools Called (LLM)"},"$ai_total_cost_usd": {"description": "The total cost in USD of the request made to the LLM API (input + output costs).",- "examples": [- 0.0041- ],+ "examples": [0.0041],"label": "AI total cost USD (LLM)"},"$ai_total_input_tokens": {@@ -1017,17 +736,12 @@},"$ai_trace_id": {"description": "The trace ID of the request made to the LLM API. Used to group together multiple generations into a single trace.",- "examples": [- "c9222e05-8708-41b8-98ea-d4a21849e761"- ],+ "examples": ["c9222e05-8708-41b8-98ea-d4a21849e761"],"label": "AI Trace ID (LLM)"},"$ai_trace_name": {"description": "The name given to this AI trace. Deprecated in favor of $ai_span_name.",- "examples": [- "summarize_text",- "chat_completion"- ],+ "examples": ["summarize_text", "chat_completion"],"label": "AI Trace Name (LLM)"},"$ai_user_prompt": {@@ -1036,56 +750,42 @@},"$ai_video_cost_usd": {"description": "The cost in USD of the video tokens for this LLM request.",- "examples": [- 0.01- ],+ "examples": [0.01],"label": "AI video cost USD (LLM)","type": "Numeric"},"$ai_video_input_tokens": {"description": "The number of video tokens in the input sent to the LLM.",- "examples": [- 512- ],+ "examples": [512],"label": "AI video input tokens (LLM)","type": "Numeric"},"$ai_video_output_tokens": {"description": "The number of video tokens generated by the LLM.",- "examples": [- 512- ],+ "examples": [512],"label": "AI video output tokens (LLM)","type": "Numeric"},"$ai_web_search_cost_usd": {"description": "The cost in USD of web searches performed during the LLM API request.",- "examples": [- 0.005- ],+ "examples": [0.005],"label": "AI web search cost USD (LLM)"},"$ai_web_search_count": {"description": "The number of web searches the LLM provider performed for this generation.",- "examples": [- 2- ],+ "examples": [2],"label": "AI web search count (LLM)","type": "Numeric"},"$ai_web_search_price": {"description": "The price per web search performed by the LLM provider.",- "examples": [- 0.01- ],+ "examples": [0.01],"label": "AI web search price (LLM)","type": "Numeric"},"$anon_distinct_id": {"description": "If the user was previously anonymous, their anonymous ID will be set here.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Anon distinct ID","system": true},@@ -1099,9 +799,7 @@},"$app_namespace": {"description": "The namespace of the app as identified in the app store.",- "examples": [- "com.posthog.app"- ],+ "examples": ["com.posthog.app"],"label": "App namespace"},"$app_version": {@@ -1116,44 +814,27 @@},"$browser": {"description": "Name of the browser the user has used.",- "examples": [- "Chrome",- "Firefox"- ],+ "examples": ["Chrome", "Firefox"],"label": "Browser"},"$browser_language": {"description": "Language.",- "examples": [- "en",- "en-US",- "cn",- "pl-PL"- ],+ "examples": ["en", "en-US", "cn", "pl-PL"],"label": "Browser language"},"$browser_language_prefix": {"description": "Language prefix.",- "examples": [- "en",- "ja"- ],+ "examples": ["en", "ja"],"label": "Browser language prefix"},"$browser_type": {"description": "This is only added when posthog-js config.opt_out_useragent_filter is true.",- "examples": [- "browser",- "bot"- ],+ "examples": ["browser", "bot"],"label": "Browser type"},"$browser_version": {"description": "The version of the browser that was used. Used in combination with Browser.",- "examples": [- "70",- "79"- ],+ "examples": ["70", "79"],"label": "Browser version"},"$capture_failed_request": {@@ -1168,61 +849,37 @@},"$client_session_initial_pathname": {"description": "Path that the user started their session on. (First-touch, session-scoped)",- "examples": [- "/register",- "/some/landing/page"- ],+ "examples": ["/register", "/some/landing/page"],"label": "Initial path"},"$client_session_initial_referring_host": {"description": "Host that the user came from. (First-touch, session-scoped)",- "examples": [- "google.com",- "facebook.com"- ],+ "examples": ["google.com", "facebook.com"],"label": "Referrer host"},"$client_session_initial_utm_campaign": {"description": "UTM Campaign. (First-touch, session-scoped)",- "examples": [- "feature launch",- "discount"- ],+ "examples": ["feature launch", "discount"],"label": "Initial UTM campaign"},"$client_session_initial_utm_content": {"description": "UTM Source. (First-touch, session-scoped)",- "examples": [- "bottom link",- "second button"- ],+ "examples": ["bottom link", "second button"],"label": "Initial UTM source"},"$client_session_initial_utm_medium": {"description": "UTM Medium. (First-touch, session-scoped)",- "examples": [- "Social",- "Organic",- "Paid",- "Email"- ],+ "examples": ["Social", "Organic", "Paid", "Email"],"label": "Initial UTM medium"},"$client_session_initial_utm_source": {"description": "UTM Source. (First-touch, session-scoped)",- "examples": [- "Google",- "Bing",- "Twitter",- "Facebook"- ],+ "examples": ["Google", "Bing", "Twitter", "Facebook"],"label": "Initial UTM source"},"$client_session_initial_utm_term": {"description": "UTM term. (First-touch, session-scoped)",- "examples": [- "free goodies"- ],+ "examples": ["free goodies"],"label": "Initial UTM term"},"$config_defaults": {@@ -1233,9 +890,7 @@},"$configured_session_timeout_ms": {"description": "Configured session timeout in milliseconds.",- "examples": [- "1800000"- ],+ "examples": ["1800000"],"label": "Configured session timeout","system": true,"used_for_debug": true@@ -1266,70 +921,48 @@},"$copy_type": {"description": "Type of copy event.",- "examples": [- "copy",- "cut"- ],+ "examples": ["copy", "cut"],"ignored_in_assistant": true,"label": "Copy type"},"$creator_event_uuid": {"description": "Unique ID for the event, which created this person.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Creator event ID"},"$csp_blocked_url": {"description": "The URL that was blocked by the CSP policy.",- "examples": [- "https://malicious-site.com/script.js"- ],+ "examples": ["https://malicious-site.com/script.js"],"label": "Blocked URL"},"$csp_column_number": {"description": "The column number in the source file where the violation occurred.",- "examples": [- "13"- ],+ "examples": ["13"],"label": "Column number"},"$csp_disposition": {"description": "The disposition of the CSP policy that was violated (enforce or report).",- "examples": [- "enforce",- "report"- ],+ "examples": ["enforce", "report"],"label": "Disposition"},"$csp_document_url": {"description": "The URL of the document where the violation occurred.",- "examples": [- "https://example.com/page"- ],+ "examples": ["https://example.com/page"],"label": "Document URL"},"$csp_effective_directive": {"description": "The CSP directive that was effectively violated.",- "examples": [- "script-src",- "img-src",- "default-src"- ],+ "examples": ["script-src", "img-src", "default-src"],"label": "Effective directive"},"$csp_line_number": {"description": "The line number in the source file where the violation occurred.",- "examples": [- "42"- ],+ "examples": ["42"],"label": "Line number"},"$csp_original_policy": {"description": "The CSP policy that was active when the violation occurred.",- "examples": [- "default-src 'self'; script-src 'self' example.com"- ],+ "examples": ["default-src 'self'; script-src 'self' example.com"],"label": "Original policy"},"$csp_raw_report": {@@ -1338,9 +971,7 @@},"$csp_referrer": {"description": "The referrer of the CSP report if available.",- "examples": [- "https://example.com/referrer"- ],+ "examples": ["https://example.com/referrer"],"label": "CSP Referrer"},"$csp_report_type": {@@ -1349,47 +980,32 @@},"$csp_script_sample": {"description": "An escaped sample of the script that caused the violation. Usually capped at 40 characters.",- "examples": [- "eval('alert(1)')"- ],+ "examples": ["eval('alert(1)')"],"label": "Script sample"},"$csp_source_file": {"description": "The source file where the violation occurred.",- "examples": [- "script.js"- ],+ "examples": ["script.js"],"label": "Source file"},"$csp_status_code": {"description": "The HTTP status code that was returned when trying to load the blocked resource.",- "examples": [- "200",- "404"- ],+ "examples": ["200", "404"],"label": "Status code"},"$csp_version": {"description": "The version of the CSP policy. Must be provided in the report URL.",- "examples": [- "1.0"- ],+ "examples": ["1.0"],"label": "CSP Policy version"},"$csp_violated_directive": {"description": "The CSP directive that was violated.",- "examples": [- "script-src",- "img-src",- "default-src"- ],+ "examples": ["script-src", "img-src", "default-src"],"label": "Violated directive"},"$current_url": {"description": "The URL visited at the time of the event.",- "examples": [- "https://example.com/interesting-article?parameter=true"- ],+ "examples": ["https://example.com/interesting-article?parameter=true"],"label": "Current URL"},"$cymbal_errors": {@@ -1475,66 +1091,43 @@},"$device": {"description": "The mobile device that was used.",- "examples": [- "iPad",- "iPhone",- "Android"- ],+ "examples": ["iPad", "iPhone", "Android"],"label": "Device"},"$device_id": {"description": "Unique ID for that device, consistent even if users are logging in/out.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Device ID","system": true},"$device_manufacturer": {"description": "The manufacturer of the device",- "examples": [- "Apple",- "Samsung"- ],+ "examples": ["Apple", "Samsung"],"label": "Device manufacturer"},"$device_model": {"description": "The model of the device that was used.",- "examples": [- "iPhone9,3",- "SM-G965W"- ],+ "examples": ["iPhone9,3", "SM-G965W"],"label": "Device model"},"$device_name": {"description": "Name of the device",- "examples": [- "iPhone 12 Pro",- "Samsung Galaxy 10"- ],+ "examples": ["iPhone 12 Pro", "Samsung Galaxy 10"],"label": "Device name"},"$device_type": {"description": "The type of device that was used.",- "examples": [- "Mobile",- "Tablet",- "Desktop"- ],+ "examples": ["Mobile", "Tablet", "Desktop"],"label": "Device type"},"$el_text": {"description": "The text of the element that was clicked. Only sent with Autocapture events.",- "examples": [- "Click here!"- ],+ "examples": ["Click here!"],"label": "Element text"},"$enabled_feature_flags": {"description": "Keys and multivariate values of the feature flags that were active while this event was sent.",- "examples": [- "{\"flag\": \"value\"}"- ],+ "examples": ["{\"flag\": \"value\"}"],"label": "Enabled feature flags"},"$event_time_override_provided": {@@ -1551,11 +1144,7 @@},"$event_type": {"description": "When the event is an $autocapture event, this specifies what the action was against the element.",- "examples": [- "click",- "submit",- "change"- ],+ "examples": ["click", "submit", "change"],"label": "Event type"},"$exception_capture_enabled_server_side": {@@ -1589,9 +1178,7 @@},"$exception_level": {"description": "Exception categorized by severity.",- "examples": [- "error"- ],+ "examples": ["error"],"label": "Exception level"},"$exception_list": {@@ -1606,11 +1193,7 @@},"$exception_source": {"description": "The SDK integration or runtime hook that captured the exception.",- "examples": [- "panic",- "rails",- "php_exception_handler"- ],+ "examples": ["panic", "rails", "php_exception_handler"],"label": "Exception capture source"},"$exception_sources": {@@ -1624,9 +1207,7 @@},"$exception_types": {"description": "The type of the exception.",- "examples": [- "TypeError"- ],+ "examples": ["TypeError"],"label": "Exception type"},"$exception_values": {@@ -1635,16 +1216,12 @@},"$external_click_url": {"description": "The URL of an external link that was clicked during autocapture. External meaning the URL points to a different host than the page the user was on.",- "examples": [- "https://example.com/some-article"- ],+ "examples": ["https://example.com/some-article"],"label": "External click URL"},"$feature_flag": {"description": "The key of the feature flag, sent on \"Feature flag called\", \"Experiment exposure\", and \"Feature enrollment\" events. To find other events where a flag was active, use \"Active feature flags\".",- "examples": [- "beta-feature"- ],+ "examples": ["beta-feature"],"label": "Feature flag"},"$feature_flag_bootstrapped_payload": {@@ -1662,24 +1239,17 @@},"$feature_flag_evaluated_at": {"description": "The timestamp (in milliseconds since Unix epoch) when the feature flag was evaluated.",- "examples": [- "1732051200000"- ],+ "examples": ["1732051200000"],"label": "Feature flag evaluated at"},"$feature_flag_has_experiment": {"description": "Whether the feature flag that was called is linked to a live experiment.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Feature flag has experiment"},"$feature_flag_id": {"description": "The numeric identifier of the feature flag that was called.",- "examples": [- "1234"- ],+ "examples": ["1234"],"label": "Feature flag ID"},"$feature_flag_original_response": {@@ -1688,9 +1258,7 @@},"$feature_flag_payload": {"description": "The JSON payload that the call to feature flag responded with (if any)",- "examples": [- "{\"variant\": \"test\"}"- ],+ "examples": ["{\"variant\": \"test\"}"],"label": "Feature flag response payload"},"$feature_flag_payloads": {@@ -1700,97 +1268,62 @@},"$feature_flag_reason": {"description": "The reason the feature flag was matched or not matched.",- "examples": [- "Matched condition set 1"- ],+ "examples": ["Matched condition set 1"],"label": "Feature flag evaluation reason"},"$feature_flag_request_id": {"description": "The unique identifier for the request that retrieved this feature flag result.\n\nNote: Primarily used by PostHog support for debugging issues with feature flags.",- "examples": [- "01234567-89ab-cdef-0123-456789abcdef"- ],+ "examples": ["01234567-89ab-cdef-0123-456789abcdef"],"label": "Feature flag request ID"},"$feature_flag_response": {"description": "What the call to feature flag responded with.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Feature flag response"},"$feature_flag_version": {"description": "The version of the feature flag that was called.",- "examples": [- "3"- ],+ "examples": ["3"],"label": "Feature flag version"},"$geoip_accuracy_radius": {"description": "Accuracy radius of the location matched to this event's IP address (in kilometers).",- "examples": [- "50"- ],+ "examples": ["50"],"label": "GeoIP detection accuracy radius"},"$geoip_city_confidence": {"description": "Confidence level of the city matched to this event's IP address.",- "examples": [- "0.5"- ],+ "examples": ["0.5"],"label": "GeoIP detection city confidence"},"$geoip_city_name": {"description": "Name of the city matched to this event's IP address.",- "examples": [- "Sydney",- "Chennai",- "Brooklyn"- ],+ "examples": ["Sydney", "Chennai", "Brooklyn"],"label": "City name"},"$geoip_continent_code": {"description": "Code of the continent matched to this event's IP address.",- "examples": [- "OC",- "AS",- "NA"- ],+ "examples": ["OC", "AS", "NA"],"label": "Continent code"},"$geoip_continent_name": {"description": "Name of the continent matched to this event's IP address.",- "examples": [- "Oceania",- "Asia",- "North America"- ],+ "examples": ["Oceania", "Asia", "North America"],"label": "Continent name"},"$geoip_country_code": {"description": "Code of the country matched to this event's IP address.",- "examples": [- "AU",- "IN",- "US"- ],+ "examples": ["AU", "IN", "US"],"label": "Country code"},"$geoip_country_confidence": {"description": "Confidence level of the country matched to this event's IP address.",- "examples": [- "0.5"- ],+ "examples": ["0.5"],"label": "GeoIP detection country confidence"},"$geoip_country_name": {"description": "Name of the country matched to this event's IP address.",- "examples": [- "Australia",- "India",- "United States"- ],+ "examples": ["Australia", "India", "United States"],"label": "Country name"},"$geoip_disable": {@@ -1799,64 +1332,39 @@},"$geoip_latitude": {"description": "Approximated latitude matched to this event's IP address.",- "examples": [- "-33.8591",- "13.1337",- "40.7"- ],+ "examples": ["-33.8591", "13.1337", "40.7"],"label": "Latitude"},"$geoip_longitude": {"description": "Approximated longitude matched to this event's IP address.",- "examples": [- "151.2",- "80.8008",- "-73.9"- ],+ "examples": ["151.2", "80.8008", "-73.9"],"label": "Longitude"},"$geoip_postal_code": {"description": "Approximated postal code matched to this event's IP address.",- "examples": [- "2000",- "600004",- "11211"- ],+ "examples": ["2000", "600004", "11211"],"label": "Postal code"},"$geoip_postal_code_confidence": {"description": "If provided by the licensed geoip database",- "examples": [- "null",- "0.1"- ],+ "examples": ["null", "0.1"],"ignored_in_assistant": true,"label": "Postal code identification confidence score","system": true},"$geoip_subdivision_1_code": {"description": "Code of the subdivision matched to this event's IP address.",- "examples": [- "NSW",- "TN",- "NY"- ],+ "examples": ["NSW", "TN", "NY"],"label": "Subdivision 1 code"},"$geoip_subdivision_1_confidence": {"description": "Confidence level of the first subdivision matched to this event's IP address.",- "examples": [- "0.5"- ],+ "examples": ["0.5"],"label": "GeoIP detection subdivision 1 confidence"},"$geoip_subdivision_1_name": {- "description": "Name of the subdivision matched to this event's IP address.",- "examples": [- "New South Wales",- "Tamil Nadu",- "New York"- ],+ "description": "Name of the subdivision matched to this event's IP address.",+ "examples": ["New South Wales", "Tamil Nadu", "New York"],"label": "Subdivision 1 name"},"$geoip_subdivision_2_code": {@@ -1865,10 +1373,7 @@},"$geoip_subdivision_2_confidence": {"description": "If provided by the licensed geoip database",- "examples": [- "null",- "0.1"- ],+ "examples": ["null", "0.1"],"ignored_in_assistant": true,"label": "Subdivision 2 identification confidence score","system": true@@ -1887,18 +1392,12 @@},"$geoip_time_zone": {"description": "Timezone matched to this event's IP address.",- "examples": [- "Australia/Sydney",- "Asia/Kolkata",- "America/New_York"- ],+ "examples": ["Australia/Sydney", "Asia/Kolkata", "America/New_York"],"label": "Timezone"},"$go_version": {"description": "The Go version that was used to capture the event.",- "examples": [- "go1.23.0"- ],+ "examples": ["go1.23.0"],"ignored_in_assistant": true,"label": "Go version","system": true@@ -1952,10 +1451,7 @@},"$host": {"description": "The hostname of the Current URL.",- "examples": [- "example.com",- "localhost:8000"- ],+ "examples": ["example.com", "localhost:8000"],"label": "Host"},"$ignore_sent_at": {@@ -1966,10 +1462,7 @@},"$initial_host": {"description": "Hostname of the URL the user first visited.",- "examples": [- "example.com",- "localhost:8000"- ],+ "examples": ["example.com", "localhost:8000"],"label": "Initial host"},"$initial_person_info": {@@ -1979,20 +1472,12 @@},"$initial_search_engine": {"description": "Search engine the user came from on their first visit, if any.",- "examples": [- "Google",- "DuckDuckGo"- ],+ "examples": ["Google", "DuckDuckGo"],"label": "Initial search engine"},"$initial_utm_source": {"description": "UTM source tag.",- "examples": [- "Google",- "Bing",- "Twitter",- "Facebook"- ],+ "examples": ["Google", "Bing", "Twitter", "Facebook"],"label": "Initial UTM source"},"$initialization_time": {@@ -2008,24 +1493,17 @@},"$ip": {"description": "IP address for this user when the event was sent.",- "examples": [- "203.0.113.0"- ],+ "examples": ["203.0.113.0"],"label": "IP address"},"$ip_address": {"description": "The IP address of the client that sent this event. Used by server-side SDKs.",- "examples": [- "203.0.113.0"- ],+ "examples": ["203.0.113.0"],"label": "IP address"},"$is_emulator": {"description": "Indicates whether the app is running on an emulator or a physical device",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Is emulator"},"$is_identified": {@@ -2034,18 +1512,12 @@},"$is_ios_running_on_mac": {"description": "Indicates whether the app is an iOS app running on macOS (Apple Silicon)",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Is iOS app running on Mac"},"$is_mac_catalyst_app": {"description": "Indicates whether the app is a Mac Catalyst app running on macOS",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Is Mac Catalyst app"},"$issue_description": {@@ -2060,12 +1532,7 @@},"$issue_severity": {"description": "The severity assigned when this exception creates an error tracking issue.",- "examples": [- "low",- "medium",- "high",- "critical"- ],+ "examples": ["low", "medium", "high", "critical"],"label": "Issue severity","type": "String"},@@ -2078,116 +1545,76 @@},"$level": {"description": "The severity level of the exception or log.",- "examples": [- "error",- "warning",- "info",- "fatal"- ],+ "examples": ["error", "warning", "info", "fatal"],"label": "Severity level","type": "String"},"$lib": {"description": "What library was used to send the event.",- "examples": [- "web",- "posthog-ios"- ],+ "examples": ["web", "posthog-ios"],"label": "Library"},"$lib_custom_api_host": {"description": "The custom API host used to send the event.",- "examples": [- "https://ph.example.com"- ],+ "examples": ["https://ph.example.com"],"label": "Library custom API host"},"$lib_rate_limit_remaining_tokens": {"description": "Remaining rate limit tokens for the posthog-js library client-side rate limiting implementation.",- "examples": [- "100"- ],+ "examples": ["100"],"ignored_in_assistant": true,"label": "Clientside rate limit remaining tokens","used_for_debug": true},"$lib_version": {"description": "Version of the library used to send the event. Used in combination with Library.",- "examples": [- "1.0.3"- ],+ "examples": ["1.0.3"],"label": "Library version"},"$lib_version__major": {"description": "Major version of the library used to send the event.",- "examples": [- 1- ],+ "examples": [1],"label": "Library version (major)"},"$lib_version__minor": {"description": "Minor version of the library used to send the event.",- "examples": [- 0- ],+ "examples": [0],"label": "Library version (minor)"},"$lib_version__patch": {"description": "Patch version of the library used to send the event.",- "examples": [- 3- ],+ "examples": [3],"label": "Library version (patch)"},"$locale": {"description": "The locale of the device",- "examples": [- "en-US",- "de-DE"- ],+ "examples": ["en-US", "de-DE"],"label": "Locale"},"$mcp_auth_failure_reason": {"description": "Why an MCP request was refused, on $mcp_auth_failed: insufficient_scope (the credential is valid but the API denied the call), inactive_oauth_token, invalid_api_key, or unknown. insufficient_scope also carries $mcp_missing_scope when the API named a scope.",- "examples": [- "insufficient_scope",- "invalid_api_key",- "inactive_oauth_token"- ],+ "examples": ["insufficient_scope", "invalid_api_key", "inactive_oauth_token"],"label": "MCP auth failure reason"},"$mcp_auth_method": {"description": "Which credential the MCP request authenticated with, derived from the bearer token's prefix: oauth, personal_api_key, id_jag, none, or unknown. Stamped on every event by PostHog's own MCP server. Use it to tell an OAuth connector apart from an API-key connection \u2014 for example when a user works around a broken OAuth flow by switching to a personal API key.",- "examples": [- "oauth",- "personal_api_key"- ],+ "examples": ["oauth", "personal_api_key"],"label": "MCP auth method"},"$mcp_auth_status": {"description": "HTTP status returned to the client when an MCP request was refused (401 for a rejected credential, 403 for a denied scope). Distinct from $mcp_error_status, which is the upstream status of a failed tool call. Only set on $mcp_auth_failed.",- "examples": [- 401,- 403- ],+ "examples": [401, 403],"label": "MCP auth status","type": "Numeric"},"$mcp_client_name": {"description": "The MCP client that initiated the connection. Common values are coding agents (Claude Code, Codex) and chat clients (Claude desktop, Claude on web).",- "examples": [- "claude-code",- "codex-mcp-client",- "Anthropic/ClaudeAI"- ],+ "examples": ["claude-code", "codex-mcp-client", "Anthropic/ClaudeAI"],"label": "MCP client name"},"$mcp_client_user_agent": {"description": "Full User-Agent string the MCP client sent on the transport. Often includes the agent name, version, and runtime mode \u2014 useful when $mcp_client_name and $mcp_client_version alone don't disambiguate the caller.",- "examples": [- "claude-code/2.1.141 (cli)",- "Anthropic/ClaudeAI"- ],+ "examples": ["claude-code/2.1.141 (cli)", "Anthropic/ClaudeAI"],"label": "MCP client user agent"},"$mcp_client_version": {@@ -2196,10 +1623,7 @@},"$mcp_consumer": {"description": "The upstream surface that initiated the MCP request, supplied via the `x-posthog-mcp-consumer` header. 'posthog-code' is the catch-all every sandbox agent sends, so it covers Signals runs as well as PostHog Desktop; break down by `source` to separate them. 'slack' means it was triggered from Slack.",- "examples": [- "posthog-code",- "slack"- ],+ "examples": ["posthog-code", "slack"],"label": "MCP consumer"},"$mcp_conversation_id": {@@ -2208,29 +1632,18 @@},"$mcp_duration_ms": {"description": "Wall-clock duration of the MCP tool or resource call, in milliseconds.",- "examples": [- 42,- 1280- ],+ "examples": [42, 1280],"label": "MCP duration (ms)","type": "Numeric"},"$mcp_error_code": {"description": "Machine-readable code for the leaf failure mode of an errored MCP tool call: the API's validation error code, or the exec dispatcher's rejection reason. Carries error codes only, never caller-supplied values. Only set when $mcp_is_error is true.",- "examples": [- "invalid",- "required",- "unknown_tool",- "invalid_json"- ],+ "examples": ["invalid", "required", "unknown_tool", "invalid_json"],"label": "MCP error code"},"$mcp_error_field": {"description": "Field path the PostHog API's validation error pointed at, with array indexes normalized to N so one failure mode groups to one value. Only set for validation failures.",- "examples": [- "actions__N__inputs__email",- "query"- ],+ "examples": ["actions__N__inputs__email", "query"],"label": "MCP error field"},"$mcp_error_message": {@@ -2239,80 +1652,48 @@},"$mcp_error_status": {"description": "Upstream HTTP status code when an MCP tool call failed against a PostHog API (e.g. 429, 500). Only set for API-originated failures.",- "examples": [- 429,- 500,- 403- ],+ "examples": [429, 500, 403],"label": "MCP error status","type": "Numeric"},"$mcp_error_type": {"description": "Failure category for an errored MCP tool call, for breaking failures down by reason. PostHog's server emits a semantic bucket (missing_context, validation, permission, timeout, rate_limited, api_4xx, api_5xx, internal); external servers using the SDK fall back to the thrown error's type. Only set when $mcp_is_error is true.",- "examples": [- "rate_limited",- "validation",- "timeout",- "api_4xx"- ],+ "examples": ["rate_limited", "validation", "timeout", "api_4xx"],"label": "MCP error type"},"$mcp_exec_inner_tool_names": {"description": "Array of every inner tool name available to the agent at the time of a tools/list request. Stored as a JSON array \u2014 filter with `contains` against a single tool name (e.g. 'execute-sql'). Only stamped on mcp_tools_list events when running in single-exec mode (in multi-tool mode the SDK's $mcp_listed_tool_names already carries the catalog). Lets you compute zombie tools by diffing against $mcp_exec_tool_call_name from mcp_tool_call events.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP exec inner tool catalog"},"$mcp_exec_target_tool": {"description": "The tool an exec info, schema, or call verb named, when it resolves to a tool in the server's catalog; `unrecognized` otherwise so the caller's own token is never recorded. Links an `info` read to the `call` that follows it.",- "examples": [- "experiment-get",- "unrecognized"- ],+ "examples": ["experiment-get", "unrecognized"],"label": "MCP exec target tool"},"$mcp_exec_tool_call_description": {"description": "In single-exec mode, $mcp_tool_name is always 'exec' (the dispatcher), so the SDK's $mcp_tool_description is the dispatcher's static text on every call. This property carries the description of the inner tool the agent was actually invoking via 'call <tool> ...' \u2014 derived server-side by parsing the exec command and looking the inner tool up in our catalog. Only present when an exec call targets a recognized inner tool.",- "examples": [- "Run a HogQL/SQL query against PostHog.",- "List feature flags in the project."- ],+ "examples": ["Run a HogQL/SQL query against PostHog.", "List feature flags in the project."],"label": "MCP exec inner tool description"},"$mcp_exec_tool_call_name": {"description": "In single-exec mode, $mcp_tool_name is always 'exec' (the dispatcher), so by itself it doesn't tell you which inner tool the agent was actually invoking. This property carries the inner tool's name \u2014 derived server-side by parsing the exec command's `call <tool> ...` form and looking it up in our catalog. Use it for breakdowns / funnels that should pivot on the real tool rather than the dispatcher. Only present when an exec call targets a recognized inner tool.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP exec inner tool name"},"$mcp_exec_verb": {"description": "Which exec dispatcher verb the request ran: tools, search, info, schema, call, learn, or `unrecognized` for a verb the server does not accept. Only set in exec mode ($mcp_mode).",- "examples": [- "call",- "info",- "unrecognized"- ],+ "examples": ["call", "info", "unrecognized"],"label": "MCP exec verb"},"$mcp_input_aliases_used": {"description": "Declared parameter aliases the call relied on, as `alias:canonical` (for example `experimentId:id`). Present only when the call did not send the canonical name and used one of its aliases instead. Both names come from the tool's own alias map. Recorded by the @posthog/mcp SDK helper. Measures how much traffic the alias layer rescues, and which spellings agents reach for.",- "examples": [- "experimentId:id",- "flagKey:key"- ],+ "examples": ["experimentId:id", "flagKey:key"],"label": "MCP input aliases used"},"$mcp_input_keys": {"description": "Top-level argument names the caller sent on a tool call, success or failure: every direct-mode call, `render-ui`, and an exec `call` (parsed from the command string). Exec discovery verbs (tools, search, info, schema) carry none, so rate against rows where it is set rather than every $mcp_tool_call. Recorded by the @posthog/mcp SDK helper: names the tool declares, including its aliases, capped at 20. Undeclared names become one `[redacted]` entry. Names only, never values. Group by it with $mcp_input_aliases_used to see how agents spell a parameter.",- "examples": [- "id",- "experimentId",- "filters, key, name"- ],+ "examples": ["id", "experimentId", "filters, key, name"],"label": "MCP input keys"},"$mcp_intent": {@@ -2325,10 +1706,7 @@},"$mcp_intent_source": {"description": "Where $mcp_intent came from. 'context_parameter' means the client supplied it directly on the call; 'inferred' means the MCP server derived it via its intentFallback.",- "examples": [- "context_parameter",- "inferred"- ],+ "examples": ["context_parameter", "inferred"],"label": "MCP intent source"},"$mcp_is_error": {@@ -2337,53 +1715,32 @@},"$mcp_listed_tool_names": {"description": "Array of every tool name advertised to the agent on a tools/list request, in multi-tool mode. Stored as a JSON array \u2014 filter with `contains` against a single tool name (e.g. 'execute-sql'). Lets you compute zombie tools (advertised but never called) by diffing against $mcp_tool_name from mcp_tool_call events. In single-exec mode the catalog rides on $mcp_exec_inner_tool_names instead. Only present on mcp_tools_list.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP listed tool names"},"$mcp_llm_model": {"description": "The model used by the MCP client for this tool call. Taken from recognized client metadata when available, otherwise from the agent's self-reported llm_model argument. MCP does not attest model identity, so use this for analytics rather than billing or access control.",- "examples": [- "claude-sonnet-5",- "gpt-5.6-sol"- ],+ "examples": ["claude-sonnet-5", "gpt-5.6-sol"],"label": "MCP model"},"$mcp_llm_model_missing_reason": {"description": "Why PostHog's MCP server captured no model identifier. missing means llm_model was omitted; unknown means the agent explicitly reported unknown; invalid means the argument was blank or not a string; not_captured means a nonempty report was not captured by the analytics SDK; capture_error means analytics preparation failed. Only set when no model was captured. Older events and other MCP servers may omit this property.",- "examples": [- "missing",- "unknown",- "invalid",- "not_captured",- "capture_error"- ],+ "examples": ["missing", "unknown", "invalid", "not_captured", "capture_error"],"label": "MCP model missing reason"},"$mcp_llm_model_source": {"description": "How the model identifier was obtained. client_metadata means the MCP client supplied recognized metadata. self_reported means the agent filled the injected llm_model argument. Both sources are unverified.",- "examples": [- "client_metadata",- "self_reported"- ],+ "examples": ["client_metadata", "self_reported"],"label": "MCP model source"},"$mcp_missing_scope": {"description": "The API scope the PostHog API said was missing when it refused an MCP request. Only set on $mcp_auth_failed with reason insufficient_scope, and only when the API named a specific scope.",- "examples": [- "insight:read",- "query:read"- ],+ "examples": ["insight:read", "query:read"],"label": "MCP missing scope"},"$mcp_mode": {"description": "Which tool-registration mode the MCP server ran in for this request. 'cli' is single-exec mode (the v2 wrapper that exposes one dispatcher tool taking a `call <tool> ...` command); 'tools' exposes every tool individually.",- "examples": [- "cli",- "tools"- ],+ "examples": ["cli", "tools"],"label": "MCP mode"},"$mcp_oauth_client_name": {@@ -2412,11 +1769,7 @@},"$mcp_protocol_version": {"description": "The MCP protocol revision the request was made under, such as 2025-11-25 or 2026-07-28.",- "examples": [- "2025-11-25",- "2025-06-18",- "2026-07-28"- ],+ "examples": ["2025-11-25", "2025-06-18", "2026-07-28"],"label": "MCP protocol version"},"$mcp_read_only": {@@ -2425,10 +1778,7 @@},"$mcp_region": {"description": "The PostHog cloud region the MCP server routed the request to.",- "examples": [- "us",- "eu"- ],+ "examples": ["us", "eu"],"label": "MCP region"},"$mcp_resource_name": {@@ -2441,27 +1791,17 @@},"$mcp_scope_preset": {"description": "Which kind of caller minted the token behind an MCP request, worked out from its scope set. 'scout' is a Signals scout run, 'research' is a read-only report-research run, 'implementation' is a write-capable implementation run, 'sandbox' is any other server-minted run (a task started from the desktop app or the pipeline before the scratchpad scopes tell research and implementation apart), and 'user' is a person's own token. Stamped on every event by PostHog's own MCP server. Use it to split scratchpad and notes usage by caller, for example to measure scout scratchpad adoption apart from ordinary users.",- "examples": [- "scout",- "research",- "implementation",- "sandbox",- "user"- ],+ "examples": ["scout", "research", "implementation", "sandbox", "user"],"label": "MCP scope preset"},"$mcp_server_build": {"description": "The exact immutable build identifier that the MCP host supplies, such as a Git commit SHA or container image digest. Use it to connect an event to deployed code when one server version has multiple builds.",- "examples": [- "b3b941584bae0123"- ],+ "examples": ["b3b941584bae0123"],"label": "MCP server build"},"$mcp_server_name": {"description": "The advertised name of the MCP server that handled the request.",- "examples": [- "PostHog"- ],+ "examples": ["PostHog"],"label": "MCP server name"},"$mcp_server_version": {@@ -2474,35 +1814,22 @@},"$mcp_skill_body_offset": {"description": "Where in a skill's body a `skill-get` started reading. Long bodies come back in slices, so one skill load is several calls that differ only by this offset, and a first read usually omits the offset \u2014 absent and 0 both mean a first page. Scope the query to `$mcp_tool_name IN ('skill-get', 'llma-skill-get')` before counting: the property is never set on `skill-file-get` or on a failed read, so an absent value outside that scope means 'never paginated' rather than 'first page', and counting it inflates loads. Within the scope, count calls where the offset is absent or 0 for loads, and every call for pages read. Set only on reads that succeeded, like `$mcp_skill_name`.",- "examples": [- "0",- "5000"- ],+ "examples": ["0", "5000"],"label": "MCP skill body offset"},"$mcp_skill_name": {"description": "The stored skill a skill-* read tool returned, on `skill-get` and `skill-file-get` (and their `llma-skill-*` aliases). Present only when the read succeeded, so counting these events counts skills that were actually delivered. A failed read carries no skill name, which stops a deleted skill that agents keep requesting from reading as a popular one. Recorded only when the value matches the shape the skills store enforces at creation, so a name the agent invented is left off rather than echoed. Skill writes are not stamped here; those emit `llma skill *` from the skills API.",- "examples": [- "prove-the-change",- "pr-shepherd"- ],+ "examples": ["prove-the-change", "pr-shepherd"],"label": "MCP skill name"},"$mcp_source": {"description": "Constant identifier for the analytics SDK that emitted the event. Lets you separate events from different SDK versions or unrelated MCP servers.",- "examples": [- "posthog_mcp_analytics"- ],+ "examples": ["posthog_mcp_analytics"],"label": "MCP source"},"$mcp_tool_category": {"description": "The product category the invoked tool belongs to \u2014 the grouping dimension the MCP analytics dashboard buckets tool calls by. Stamped server-side from the tool catalog (PostHog's server) or declared per tool (external servers). Omitted when the tool has no catalogued category (e.g. the `exec` dispatcher), which the dashboard buckets as 'Uncategorized'. Present on mcp_tool_call.",- "examples": [- "Error tracking",- "Logs",- "Feature flags",- "Session replays"- ],+ "examples": ["Error tracking", "Logs", "Feature flags", "Session replays"],"label": "MCP tool category"},"$mcp_tool_description": {@@ -2515,109 +1842,68 @@},"$mcp_tool_name": {"description": "The name of the MCP tool that was invoked. Only present on mcp_tool_call.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP tool name"},"$mcp_transport": {"description": "The transport the MCP client used to connect to the server.",- "examples": [- "stdio",- "sse",- "streamable-http"- ],+ "examples": ["stdio", "sse", "streamable-http"],"label": "MCP transport"},"$mcp_validation_fields": {"description": "Parameter paths the MCP server's own input schema rejected, as `path:code` (for example `id:invalid_type`). Names from the tool's schema, never caller values. Only set when the server rejected the input before calling PostHog.",- "examples": [- "id:invalid_type",- "filters.groups:required"- ],+ "examples": ["id:invalid_type", "filters.groups:required"],"label": "MCP validation fields"},"$mcp_vendor_client": {"description": "Vendor client header the MCP client sent on the transport (x-anthropic-client), captured raw. The strongest harness signal: clientInfo.name can't tell one vendor surface from another, but this header can.",- "examples": [- "ClaudeCode",- "ClaudeAI",- "Cowork"- ],+ "examples": ["ClaudeCode", "ClaudeAI", "Cowork"],"label": "MCP vendor client"},"$mcp_version": {"description": "Server-resolved MCP version. May differ from the version the client reported because of the mcp-version-2 feature flag.",- "examples": [- 1,- 2- ],+ "examples": [1, 2],"label": "MCP server version (internal)","type": "Numeric"},"$network_bluetooth": {"description": "Whether the user was on Bluetooth when the event was sent.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Network Bluetooth"},"$network_carrier": {"description": "The network carrier that the user is on.",- "examples": [- "cricket",- "telecom"- ],+ "examples": ["cricket", "telecom"],"label": "Network carrier"},"$network_cellular": {"description": "Whether the user was on cellular when the event was sent.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Network Cellular"},"$network_wifi": {"description": "Whether the user was on WiFi when the event was sent.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Network WiFi"},"$os": {"description": "The operating system of the user.",- "examples": [- "Windows",- "Mac OS X"- ],+ "examples": ["Windows", "Mac OS X"],"label": "OS"},"$os_distro": {"description": "The distribution name in case of Linux.",- "examples": [- "Ubuntu",- "Debian",- "Fedora"- ],+ "examples": ["Ubuntu", "Debian", "Fedora"],"label": "OS distro"},"$os_name": {"description": "The Operating System name.",- "examples": [- "iOS",- "Android"- ],+ "examples": ["iOS", "Android"],"label": "OS name"},"$os_version": {"description": "The Operating System version.",- "examples": [- "15.5"- ],+ "examples": ["15.5"],"label": "OS version"},"$otel_end_time_unix_nano": {@@ -2656,10 +1942,7 @@},"$pathname": {"description": "The path of the Current URL, which means everything in the url after the domain.",- "examples": [- "/pricing",- "/about-us/team"- ],+ "examples": ["/pricing", "/about-us/team"],"label": "Path name"},"$performance_page_loaded": {@@ -2685,81 +1968,58 @@},"$prev_pageview_duration": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview duration"},"$prev_pageview_id": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- "1"- ],+ "examples": ["1"],"label": "Previous pageview ID","system": true},"$prev_pageview_last_content": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview last content"},"$prev_pageview_last_content_percentage": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview last content percentage"},"$prev_pageview_last_scroll": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview last scroll"},"$prev_pageview_last_scroll_percentage": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview last scroll percentage"},"$prev_pageview_max_content": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview max content"},"$prev_pageview_max_content_percentage": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview max content percentage"},"$prev_pageview_max_scroll": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview max scroll"},"$prev_pageview_max_scroll_percentage": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview max scroll percentage"},"$prev_pageview_pathname": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- "/pricing",- "/about-us/team"- ],+ "examples": ["/pricing", "/about-us/team"],"label": "Previous pageview pathname"},"$process_person": {@@ -2789,19 +2049,13 @@},"$product_tour_step_order": {"description": "The zero-based order of the product tour step the event relates to.",- "examples": [- 0,- 1,- 2- ],+ "examples": [0, 1, 2],"label": "Product tour step order","type": "Numeric"},"$product_tour_steps_count": {"description": "The total number of steps in the product tour.",- "examples": [- 5- ],+ "examples": [5],"label": "Product tour steps count","type": "Numeric"},@@ -2813,27 +2067,21 @@},"$python_runtime": {"description": "The Python runtime that was used to capture the event.",- "examples": [- "CPython"- ],+ "examples": ["CPython"],"ignored_in_assistant": true,"label": "Python runtime","system": true},"$python_version": {"description": "The Python version that was used to capture the event.",- "examples": [- "3.11.5"- ],+ "examples": ["3.11.5"],"ignored_in_assistant": true,"label": "Python version","system": true},"$raw_user_agent": {"description": "PostHog process information like browser, OS, and device type from the user agent string. This is the raw user agent string.",- "examples": [- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)"- ],+ "examples": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)"],"label": "Raw user agent"},"$recording_status": {@@ -2844,24 +2092,17 @@},"$referrer": {"description": "URL of where the user came from.",- "examples": [- "https://google.com/search?q=posthog&rlz=1C..."- ],+ "examples": ["https://google.com/search?q=posthog&rlz=1C..."],"label": "Referrer URL"},"$referring_domain": {"description": "Domain of where the user came from.",- "examples": [- "google.com",- "facebook.com"- ],+ "examples": ["google.com", "facebook.com"],"label": "Referring domain"},"$replay_minimum_duration": {"description": "Config for minimum duration before emitting a session recording.",- "examples": [- "1000"- ],+ "examples": ["1000"],"label": "Replay config - minimum duration","system": true,"used_for_debug": true@@ -2892,43 +2133,32 @@},"$replay_sample_rate": {"description": "Config for sampling rate of session recordings.",- "examples": [- "0.1"- ],+ "examples": ["0.1"],"label": "Replay config - sample rate","system": true,"used_for_debug": true},"$replay_script_config": {"description": "Sets an alternative recorder script for the web sdk.",- "examples": [- "{\"script\": \"recorder-next\"}"- ],+ "examples": ["{\"script\": \"recorder-next\"}"],"label": "Replay script config","system": true,"used_for_debug": true},"$revenue": {"description": "The revenue associated with an event, in your account's base currency.",- "examples": [- 9.99- ],+ "examples": [9.99],"label": "Revenue","type": "Numeric"},"$screen_density": {"description": "The logical density of the display. This is a scaling factor for the Density Independent Pixel unit, where one DIP is one pixel on an approximately 160 dpi screen (for example a 240x320, 1.5\"x2\" screen), providing the baseline of the system's display. Thus on a 160dpi screen this density value will be 1; on a 120 dpi screen it would be .75; etc.",- "examples": [- 2.75- ],+ "examples": [2.75],"label": "Screen density"},"$screen_height": {"description": "The height of the user's entire screen (in pixels).",- "examples": [- "2160",- "1050"- ],+ "examples": ["2160", "1050"],"label": "Screen height"},"$screen_name": {@@ -2937,10 +2167,7 @@},"$screen_width": {"description": "The width of the user's entire screen (in pixels).",- "examples": [- "1440",- "1920"- ],+ "examples": ["1440", "1920"],"label": "Screen width"},"$sdk_debug_current_session_duration": {@@ -2957,28 +2184,21 @@},"$sdk_debug_extensions_init_method": {"description": "The method used to initialize PostHog.js extensions.",- "examples": [- "deferred",- "synchronous"- ],+ "examples": ["deferred", "synchronous"],"label": "PostHog.js extensions init method","type": "String","used_for_debug": true},"$sdk_debug_extensions_init_time_ms": {"description": "The time taken to initialize PostHog.js extensions in milliseconds.",- "examples": [- 150- ],+ "examples": [150],"label": "PostHog.js extensions init time (ms)","type": "Numeric","used_for_debug": true},"$sdk_debug_pending_queue_size": {"description": "Useful for debugging. The depth of the mobile SDK's single disk-backed event queue, which handles both normal batching and retry backoff. Mobile SDKs report this instead of the retry queue size.",- "examples": [- "100"- ],+ "examples": ["100"],"ignored_in_assistant": true,"label": "Pending queue size","system": true,@@ -2991,21 +2211,14 @@},"$sdk_debug_replay_capture_mode": {"description": "How the mobile SDK captures the screen for session replay.",- "examples": [- "screenshot",- "wireframe"- ],+ "examples": ["screenshot", "wireframe"],"label": "Replay capture mode","type": "String","used_for_debug": true},"$sdk_debug_replay_event_trigger_status": {"description": "The status of the recording event trigger.",- "examples": [- "trigger_disabled",- "trigger_pending",- "trigger_matched"- ],+ "examples": ["trigger_disabled", "trigger_pending", "trigger_matched"],"label": "event trigger status","type": "String","used_for_debug": true@@ -3035,9 +2248,7 @@},"$sdk_debug_replay_internal_buffer_length": {"description": "Useful for debugging. The internal buffer length for replay.",- "examples": [- "100"- ],+ "examples": ["100"],"ignored_in_assistant": true,"label": "Replay internal buffer length","system": true,@@ -3045,9 +2256,7 @@},"$sdk_debug_replay_internal_buffer_size": {"description": "Useful for debugging. The internal buffer size for replay.",- "examples": [- "100"- ],+ "examples": ["100"],"ignored_in_assistant": true,"label": "Replay internal buffer size","system": true,@@ -3055,11 +2264,7 @@},"$sdk_debug_replay_linked_flag_trigger_status": {"description": "The status of the linked flag trigger.",- "examples": [- "trigger_disabled",- "trigger_pending",- "trigger_matched"- ],+ "examples": ["trigger_disabled", "trigger_pending", "trigger_matched"],"label": "linked flag trigger status","type": "String","used_for_debug": true@@ -3076,10 +2281,7 @@},"$sdk_debug_replay_remote_trigger_matching_config": {"description": "Whether to match on all or any triggers.",- "examples": [- "all",- "any"- ],+ "examples": ["all", "any"],"label": "remote trigger matching config","type": "String","used_for_debug": true@@ -3091,38 +2293,28 @@},"$sdk_debug_replay_throttle_delay_ms": {"description": "The configured session replay throttle delay in milliseconds on mobile SDKs.",- "examples": [- 1000- ],+ "examples": [1000],"label": "Replay throttle delay (ms)","type": "Numeric","used_for_debug": true},"$sdk_debug_replay_trigger_groups_count": {"description": "The number of V2 recording trigger groups configured for this project.",- "examples": [- 2- ],+ "examples": [2],"label": "Recording trigger groups count","type": "Numeric","used_for_debug": true},"$sdk_debug_replay_url_trigger_status": {"description": "The status of the recording url trigger.",- "examples": [- "trigger_disabled",- "trigger_pending",- "trigger_matched"- ],+ "examples": ["trigger_disabled", "trigger_pending", "trigger_matched"],"label": "URL trigger status","type": "String","used_for_debug": true},"$sdk_debug_retry_queue_size": {"description": "Useful for debugging. The size of the retry queue.",- "examples": [- "100"- ],+ "examples": ["100"],"ignored_in_assistant": true,"label": "Retry queue size","system": true,@@ -3148,10 +2340,7 @@},"$search_engine": {"description": "The search engine the user came in from (if any).",- "examples": [- "Google",- "DuckDuckGo"- ],+ "examples": ["Google", "DuckDuckGo"],"label": "Search engine"},"$selected_content": {@@ -3161,24 +2350,18 @@},"$sent_at": {"description": "Time the event was sent to PostHog. Used for correcting the event timestamp when the device clock is off.",- "examples": [- "2023-05-20T15:31:00Z"- ],+ "examples": ["2023-05-20T15:31:00Z"],"label": "Sent at"},"$sentry_event_id": {"description": "This is the Sentry key for an event.",- "examples": [- "byroc2ar9ee4ijqp"- ],+ "examples": ["byroc2ar9ee4ijqp"],"label": "Sentry event ID","system": true},"$sentry_url": {"description": "Direct link to the exception in Sentry",- "examples": [- "https://sentry.io/..."- ],+ "examples": ["https://sentry.io/..."],"label": "Sentry URL"},"$sess_rec_flush_size": {@@ -3229,10 +2412,7 @@},"$session_entry_host": {"description": "The hostname of the Current URL. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "example.com",- "localhost:8000"- ],+ "examples": ["example.com", "localhost:8000"],"ignored_in_assistant": true,"label": "Session entry Host"},@@ -3263,10 +2443,7 @@},"$session_entry_pathname": {"description": "The path of the Current URL, which means everything in the url after the domain. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "/pricing",- "/about-us/team"- ],+ "examples": ["/pricing", "/about-us/team"],"ignored_in_assistant": true,"label": "Session entry Path name"},@@ -3287,18 +2464,13 @@},"$session_entry_referrer": {"description": "URL of where the user came from. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "https://google.com/search?q=posthog&rlz=1C..."- ],+ "examples": ["https://google.com/search?q=posthog&rlz=1C..."],"ignored_in_assistant": true,"label": "Session entry Referrer URL"},"$session_entry_referring_domain": {"description": "Domain of where the user came from. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "google.com",- "facebook.com"- ],+ "examples": ["google.com", "facebook.com"],"ignored_in_assistant": true,"label": "Session entry Referring domain"},@@ -3309,10 +2481,7 @@},"$session_entry_search_engine": {"description": "The search engine the user came in from (if any). Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "Google",- "DuckDuckGo"- ],+ "examples": ["Google", "DuckDuckGo"],"ignored_in_assistant": true,"label": "Session entry Search engine"},@@ -3328,57 +2497,37 @@},"$session_entry_url": {"description": "The URL visited at the time of the event. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "https://example.com/interesting-article?parameter=true"- ],+ "examples": ["https://example.com/interesting-article?parameter=true"],"ignored_in_assistant": true,"label": "Session entry Current URL"},"$session_entry_utm_campaign": {"description": "UTM campaign tag. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "feature launch",- "discount"- ],+ "examples": ["feature launch", "discount"],"ignored_in_assistant": true,"label": "Session entry UTM campaign"},"$session_entry_utm_content": {"description": "UTM content tag. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "bottom link",- "second button"- ],+ "examples": ["bottom link", "second button"],"ignored_in_assistant": true,"label": "Session entry UTM content"},"$session_entry_utm_medium": {"description": "UTM medium tag. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "Social",- "Organic",- "Paid",- "Email"- ],+ "examples": ["Social", "Organic", "Paid", "Email"],"ignored_in_assistant": true,"label": "Session entry UTM medium"},"$session_entry_utm_source": {"description": "UTM source tag. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "Google",- "Bing",- "Twitter",- "Facebook"- ],+ "examples": ["Google", "Bing", "Twitter", "Facebook"],"ignored_in_assistant": true,"label": "Session entry UTM source"},"$session_entry_utm_term": {"description": "UTM term tag. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "free goodies"- ],+ "examples": ["free goodies"],"ignored_in_assistant": true,"label": "Session entry UTM term"},@@ -3394,10 +2543,7 @@},"$session_is_sampled": {"description": "Whether the session is sampled for session recording.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"ignored_in_assistant": true,"label": "Whether the session is sampled","system": true,@@ -3405,9 +2551,7 @@},"$session_recording_canvas_recording": {"description": "Session recording canvas capture config.",- "examples": [- "{\"enabled\": false}"- ],+ "examples": ["{\"enabled\": false}"],"label": "Session recording canvas recording","system": true,"used_for_debug": true@@ -3426,18 +2570,14 @@},"$session_recording_network_payload_capture": {"description": "Session recording network payload capture config.",- "examples": [- "{\"recordHeaders\": false}"- ],+ "examples": ["{\"recordHeaders\": false}"],"label": "Session recording network payload capture","system": true,"used_for_debug": true},"$session_recording_recorder_version_server_side": {"description": "The version of the session recording recorder that is enabled server-side.",- "examples": [- "v2"- ],+ "examples": ["v2"],"ignored_in_assistant": true,"label": "Session recording recorder version server-side","system": true,@@ -3450,11 +2590,7 @@},"$session_recording_start_reason": {"description": "Reason for starting the session recording. Useful for e.g. if you have sampling enabled and want to see on batch exported events which sessions have recordings available.",- "examples": [- "sampling_override",- "recording_initialized",- "linked_flag_match"- ],+ "examples": ["sampling_override", "recording_initialized", "linked_flag_match"],"label": "Session recording start reason","system": true,"used_for_debug": true@@ -3501,10 +2637,7 @@},"$snapshot_source": {"description": "The platform a session recording snapshot was captured on.",- "examples": [- "web",- "mobile"- ],+ "examples": ["web", "mobile"],"label": "Snapshot source","type": "String"},@@ -3532,10 +2665,7 @@},"$survey_name": {"description": "The name of the survey.",- "examples": [- "Product Feedback for New Product",- "Home page NPS"- ],+ "examples": ["Product Feedback for New Product", "Home page NPS"],"label": "Survey name"},"$survey_partially_completed": {@@ -3548,11 +2678,7 @@},"$survey_response": {"description": "The response value for the first question in the survey.",- "examples": [- "I love it!",- 5,- "['choice 1', 'choice 3']"- ],+ "examples": ["I love it!", 5, "['choice 1', 'choice 3']"],"label": "Survey response"},"$survey_response_1": {@@ -3570,17 +2696,13 @@},"$time": {"description": "Use the SQL field `timestamp` instead. This field was previously set on some client side events.",- "examples": [- "1681211521.345"- ],+ "examples": ["1681211521.345"],"label": "$time (deprecated)","system": true},"$timestamp": {"description": "Use the SQL field `timestamp` instead. This field was previously set on some client side events.",- "examples": [- "2023-05-20T15:30:00Z"- ],+ "examples": ["2023-05-20T15:30:00Z"],"label": "Timestamp (deprecated)","system": true},@@ -3608,9 +2730,7 @@},"$user_agent": {"description": "Some SDKs (like Android) send the raw user agent as $user_agent.",- "examples": [- "Dalvik/2.1.0 (Linux; U; Android 11; Pixel 3 Build/RQ2A.210505.002)"- ],+ "examples": ["Dalvik/2.1.0 (Linux; U; Android 11; Pixel 3 Build/RQ2A.210505.002)"],"label": "Raw user agent"},"$user_id": {@@ -3619,40 +2739,24 @@},"$viewport_height": {"description": "The height of the user's actual browser window (in pixels).",- "examples": [- "2094",- "1031"- ],+ "examples": ["2094", "1031"],"label": "Viewport height"},"$viewport_width": {"description": "The width of the user's actual browser window (in pixels).",- "examples": [- "1439",- "1915"- ],+ "examples": ["1439", "1915"],"label": "Viewport width"},"$virt_bot_name": {"description": "Name of the detected bot or crawler.",- "examples": [- "Googlebot",- "ChatGPT",- "Claude",- "curl"- ],+ "examples": ["Googlebot", "ChatGPT", "Claude", "curl"],"label": "Bot name","type": "String","virtual": true},"$virt_bot_operator": {"description": "Company or organization operating the bot.",- "examples": [- "Google",- "OpenAI",- "Anthropic",- "Microsoft"- ],+ "examples": ["Google", "OpenAI", "Anthropic", "Microsoft"],"label": "Bot operator","type": "String","virtual": true@@ -3665,25 +2769,14 @@},"$virt_traffic_category": {"description": "Detailed traffic category: ai_crawler, ai_search, ai_assistant, search_crawler, seo_crawler, etc. Bots the project defined itself report the category picked in settings.",- "examples": [- "ai_crawler",- "ai_search",- "ai_assistant",- "search_crawler",- "regular"- ],+ "examples": ["ai_crawler", "ai_search", "ai_assistant", "search_crawler", "regular"],"label": "Traffic category","type": "String","virtual": true},"$virt_traffic_type": {"description": "Classification of traffic: Regular, Bot, AI Agent, or Automation.",- "examples": [- "Regular",- "Bot",- "AI Agent",- "Automation"- ],+ "examples": ["Regular", "Bot", "AI Agent", "Automation"],"label": "Traffic type","type": "String","virtual": true@@ -3699,11 +2792,7 @@},"$web_vitals_CLS_value": {"description": "Cumulative layout shift, a score without a unit, usually between 0 and 1. Do not plot it on the same axis as the millisecond metrics, and aggregate it with a percentile such as P90 rather than a count or an average. CLS is only final when the page is hidden, so it lands on a later $web_vitals event than LCP and FCP, and the metric counts are not comparable.",- "examples": [- 0.01,- 0.1,- 0.25- ],+ "examples": [0.01, 0.1, 0.25],"label": "Web vitals CLS value","type": "Numeric"},@@ -3712,11 +2801,7 @@},"$web_vitals_FCP_value": {"description": "First contentful paint, in milliseconds: the time until the browser paints the first text or image. Aggregate it with a percentile such as P90, as the web analytics web vitals tab does, rather than a count or an average. Each $web_vitals event only carries the metrics that were ready when it was sent, so the four metrics sit on different sets of events and their counts are not comparable.",- "examples": [- 800,- 1500,- 3000- ],+ "examples": [800, 1500, 3000],"label": "Web vitals FCP value","type": "Numeric"},@@ -3725,11 +2810,7 @@},"$web_vitals_INP_value": {"description": "Interaction to next paint, in milliseconds: how long the page takes to respond to a user interaction. Aggregate it with a percentile such as P90, as the web analytics web vitals tab does, rather than a count or an average. INP is only final when the page is hidden, so it lands on a later $web_vitals event than LCP and FCP. A page with no user interaction has no INP value at all, so the metric counts are not comparable.",- "examples": [- 50,- 200,- 500- ],+ "examples": [50, 200, 500],"label": "Web vitals INP value","type": "Numeric"},@@ -3738,19 +2819,13 @@},"$web_vitals_LCP_value": {"description": "Largest contentful paint, in milliseconds: the time until the largest text or image in the viewport is painted. Aggregate it with a percentile such as P90, as the web analytics web vitals tab does, rather than a count or an average. Each $web_vitals event only carries the metrics that were ready when it was sent, so the four metrics sit on different sets of events and their counts are not comparable.",- "examples": [- 1200,- 2500,- 4000- ],+ "examples": [1200, 2500, 4000],"label": "Web vitals LCP value","type": "Numeric"},"$web_vitals_allowed_metrics": {"description": "Allowed web vitals metrics config.",- "examples": [- "[\"LCP\", \"CLS\"]"- ],+ "examples": ["[\"LCP\", \"CLS\"]"],"label": "Web vitals allowed metrics","system": true},@@ -3760,19 +2835,12 @@},"$webview_app": {"description": "Name of the host app whose in-app browser the event came from, such as an event opened inside the LinkedIn or Instagram app. Set from the user agent when the SDK can identify the host app.",- "examples": [- "LinkedIn",- "Instagram",- "TikTok"- ],+ "examples": ["LinkedIn", "Instagram", "TikTok"],"label": "In-app browser"},"$webview_app_version": {"description": "Version of the host app whose in-app browser the event came from.",- "examples": [- "309.1.0",- "375.0.0"- ],+ "examples": ["309.1.0", "375.0.0"],"label": "In-app browser version"},"$window_id": {@@ -3786,19 +2854,12 @@},"build": {"description": "The build number for the app. Mobile SDKs send this on app lifecycle events only. Most events carry App build ($app_build) instead.",- "examples": [- "1"- ],+ "examples": ["1"],"label": "App build (app lifecycle)"},"currency": {"description": "The currency code associated with the event.",- "examples": [- "USD",- "EUR",- "GBP",- "CAD"- ],+ "examples": ["USD", "EUR", "GBP", "CAD"],"label": "Currency"},"dclid": {@@ -3807,9 +2868,7 @@},"distinct_id": {"description": "The current distinct ID of the user.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Distinct ID"},"duration_ms": {@@ -3831,10 +2890,7 @@},"from_background": {"description": "Whether the app was opened for the first time or from the background.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "From background"},"gad_source": {@@ -3875,10 +2931,7 @@},"mcp_client_name": {"description": "Older unprefixed variant of $mcp_client_name. Emitted on events from the pre-@posthog/mcp code paths; prefer $mcp_client_name for new dashboards.",- "examples": [- "claude-code",- "codex-mcp-client"- ],+ "examples": ["claude-code", "codex-mcp-client"],"label": "MCP client name (unprefixed)"},"mcp_client_version": {@@ -3907,17 +2960,12 @@},"mcp_runtime": {"description": "Server runtime that handled the MCP request. 'hono' means it was served by the Hono-based MCP server.",- "examples": [- "hono"- ],+ "examples": ["hono"],"label": "MCP runtime"},"mcp_session_client_name": {"description": "MCP client name captured at session initialize and carried across every request in that session. Session-scoped counterpart of $mcp_client_name.",- "examples": [- "claude-code",- "codex-mcp-client"- ],+ "examples": ["claude-code", "codex-mcp-client"],"label": "MCP session client name"},"mcp_session_client_version": {@@ -3926,10 +2974,7 @@},"mcp_session_consumer": {"description": "Upstream surface that initiated the MCP session, captured at session initialize. Session-scoped counterpart of $mcp_consumer.",- "examples": [- "posthog-code",- "slack"- ],+ "examples": ["posthog-code", "slack"],"label": "MCP session consumer"},"mcp_session_id": {@@ -3938,18 +2983,12 @@},"mcp_session_protocol_version": {"description": "MCP protocol version negotiated at session initialize and carried across every request in that session.",- "examples": [- "2025-11-25",- "2025-06-18"- ],+ "examples": ["2025-11-25", "2025-06-18"],"label": "MCP session protocol version"},"mcp_session_vendor_client": {"description": "Vendor client captured at session initialize and carried across every request in that session.",- "examples": [- "ClaudeCode",- "ClaudeAI"- ],+ "examples": ["ClaudeCode", "ClaudeAI"],"label": "MCP session vendor client"},"mcp_transport": {@@ -3958,10 +2997,7 @@},"mcp_vendor_client": {"description": "Older unprefixed variant of $mcp_vendor_client, stamped only by PostHog's hosted MCP server. Coalesce both keys when querying vendor identity directly; the harness resolution in MCP analytics already does.",- "examples": [- "ClaudeCode",- "ClaudeAI"- ],+ "examples": ["ClaudeCode", "ClaudeAI"],"label": "MCP vendor client (legacy)"},"mcp_version": {@@ -3979,16 +3015,12 @@},"previous_build": {"description": "The previous build number for the app",- "examples": [- "1"- ],+ "examples": ["1"],"label": "App previous build"},"previous_version": {"description": "The previous version of the app",- "examples": [- "1.0.0"- ],+ "examples": ["1.0.0"],"label": "App previous version"},"qclid": {@@ -4009,9 +3041,7 @@},"referring_application": {"description": "The namespace of the app that made the request.",- "examples": [- "com.posthog.app"- ],+ "examples": ["com.posthog.app"],"label": "Referrer application"},"resource_name": {@@ -4020,9 +3050,7 @@},"revenue": {"description": "The revenue associated with the event. By default, this is in USD, but the currency property can be used to specify a different currency.",- "examples": [- 10.0- ],+ "examples": [10.0],"label": "Revenue"},"scanner_id": {@@ -4035,12 +3063,7 @@},"scanner_type": {"description": "Which kind of analysis ran. Monitors answer a yes/no question, classifiers assign tags, scorers return a number, and summarizers describe the session.",- "examples": [- "monitor",- "classifier",- "scorer",- "summarizer"- ],+ "examples": ["monitor", "classifier", "scorer", "summarizer"],"label": "Scanner type (Replay Vision)"},"scanner_version": {@@ -4054,9 +3077,7 @@},"token": {"description": "Token used for authentication.",- "examples": [- "ph_abcdefg"- ],+ "examples": ["ph_abcdefg"],"ignored_in_assistant": true,"label": "Token"},@@ -4074,67 +3095,42 @@},"url": {"description": "The deep link URL that the app was opened from.",- "examples": [- "https://open.my.app"- ],+ "examples": ["https://open.my.app"],"label": "URL"},"utm_campaign": {"description": "UTM campaign tag.",- "examples": [- "feature launch",- "discount"- ],+ "examples": ["feature launch", "discount"],"label": "UTM campaign"},"utm_content": {"description": "UTM content tag.",- "examples": [- "bottom link",- "second button"- ],+ "examples": ["bottom link", "second button"],"label": "UTM content"},"utm_medium": {"description": "UTM medium tag.",- "examples": [- "Social",- "Organic",- "Paid",- "Email"- ],+ "examples": ["Social", "Organic", "Paid", "Email"],"label": "UTM medium"},"utm_name": {"description": "UTM campaign tag, sent via Segment.",- "examples": [- "feature launch",- "discount"- ],+ "examples": ["feature launch", "discount"],"label": "UTM name"},"utm_source": {"description": "UTM source tag.",- "examples": [- "Google",- "Bing",- "Twitter",- "Facebook"- ],+ "examples": ["Google", "Bing", "Twitter", "Facebook"],"label": "UTM source"},"utm_term": {"description": "UTM term tag.",- "examples": [- "free goodies"- ],+ "examples": ["free goodies"],"label": "UTM term"},"version": {"description": "The version of the app. Mobile SDKs send this on app lifecycle events only. Most events carry App version ($app_version) instead.",- "examples": [- "1.0.0"- ],+ "examples": ["1.0.0"],"label": "App version (app lifecycle)"},"wbraid": {@@ -4187,9 +3183,7 @@},"$autocapture": {"description": "User interactions that were automatically captured.",- "examples": [- "clicked button"- ],+ "examples": ["clicked button"],"ignored_in_assistant": true,"label": "Autocapture"},@@ -4238,10 +3232,7 @@},"$csp_violation": {"description": "Content Security Policy violation reported by a browser to our csp endpoint.",- "examples": [- "Unauthorized inline script",- "Trying to load resources from unauthorized domain"- ],+ "examples": ["Unauthorized inline script", "Trying to load resources from unauthorized domain"],"label": "CSP violation","primary_property": "$csp_violated_directive"},@@ -4308,9 +3299,7 @@},"$feature_flag_called": {"description": "Sent by PostHog SDKs each time a feature flag is evaluated.\n\nPostHog still collects this event, but its data is moving, so a saved query built on it will stop returning results. To see how a flag is used, open the flag and check its Usage tab.",- "examples": [- "beta-feature"- ],+ "examples": ["beta-feature"],"hidden_in_query_builders": true,"ignored_in_assistant": true,"label": "Feature flag called",@@ -4609,11 +3598,7 @@"log_entries": {"level": {"description": "Level of the ",- "examples": [- "info",- "warn",- "error"- ],+ "examples": ["info", "warn", "error"],"label": "Console log level"},"message": {@@ -4624,45 +3609,28 @@"mcp_properties": {"$mcp_auth_failure_reason": {"description": "Why an MCP request was refused, on $mcp_auth_failed: insufficient_scope (the credential is valid but the API denied the call), inactive_oauth_token, invalid_api_key, or unknown. insufficient_scope also carries $mcp_missing_scope when the API named a scope.",- "examples": [- "insufficient_scope",- "invalid_api_key",- "inactive_oauth_token"- ],+ "examples": ["insufficient_scope", "invalid_api_key", "inactive_oauth_token"],"label": "MCP auth failure reason"},"$mcp_auth_method": {"description": "Which credential the MCP request authenticated with, derived from the bearer token's prefix: oauth, personal_api_key, id_jag, none, or unknown. Stamped on every event by PostHog's own MCP server. Use it to tell an OAuth connector apart from an API-key connection \u2014 for example when a user works around a broken OAuth flow by switching to a personal API key.",- "examples": [- "oauth",- "personal_api_key"- ],+ "examples": ["oauth", "personal_api_key"],"label": "MCP auth method"},"$mcp_auth_status": {"description": "HTTP status returned to the client when an MCP request was refused (401 for a rejected credential, 403 for a denied scope). Distinct from $mcp_error_status, which is the upstream status of a failed tool call. Only set on $mcp_auth_failed.",- "examples": [- 401,- 403- ],+ "examples": [401, 403],"label": "MCP auth status","type": "Numeric"},"$mcp_client_name": {"description": "The MCP client that initiated the connection. Common values are coding agents (Claude Code, Codex) and chat clients (Claude desktop, Claude on web).",- "examples": [- "claude-code",- "codex-mcp-client",- "Anthropic/ClaudeAI"- ],+ "examples": ["claude-code", "codex-mcp-client", "Anthropic/ClaudeAI"],"label": "MCP client name"},"$mcp_client_user_agent": {"description": "Full User-Agent string the MCP client sent on the transport. Often includes the agent name, version, and runtime mode \u2014 useful when $mcp_client_name and $mcp_client_version alone don't disambiguate the caller.",- "examples": [- "claude-code/2.1.141 (cli)",- "Anthropic/ClaudeAI"- ],+ "examples": ["claude-code/2.1.141 (cli)", "Anthropic/ClaudeAI"],"label": "MCP client user agent"},"$mcp_client_version": {@@ -4671,10 +3639,7 @@},"$mcp_consumer": {"description": "The upstream surface that initiated the MCP request, supplied via the `x-posthog-mcp-consumer` header. 'posthog-code' is the catch-all every sandbox agent sends, so it covers Signals runs as well as PostHog Desktop; break down by `source` to separate them. 'slack' means it was triggered from Slack.",- "examples": [- "posthog-code",- "slack"- ],+ "examples": ["posthog-code", "slack"],"label": "MCP consumer"},"$mcp_conversation_id": {@@ -4683,29 +3648,18 @@},"$mcp_duration_ms": {"description": "Wall-clock duration of the MCP tool or resource call, in milliseconds.",- "examples": [- 42,- 1280- ],+ "examples": [42, 1280],"label": "MCP duration (ms)","type": "Numeric"},"$mcp_error_code": {"description": "Machine-readable code for the leaf failure mode of an errored MCP tool call: the API's validation error code, or the exec dispatcher's rejection reason. Carries error codes only, never caller-supplied values. Only set when $mcp_is_error is true.",- "examples": [- "invalid",- "required",- "unknown_tool",- "invalid_json"- ],+ "examples": ["invalid", "required", "unknown_tool", "invalid_json"],"label": "MCP error code"},"$mcp_error_field": {"description": "Field path the PostHog API's validation error pointed at, with array indexes normalized to N so one failure mode groups to one value. Only set for validation failures.",- "examples": [- "actions__N__inputs__email",- "query"- ],+ "examples": ["actions__N__inputs__email", "query"],"label": "MCP error field"},"$mcp_error_message": {@@ -4714,80 +3668,48 @@},"$mcp_error_status": {"description": "Upstream HTTP status code when an MCP tool call failed against a PostHog API (e.g. 429, 500). Only set for API-originated failures.",- "examples": [- 429,- 500,- 403- ],+ "examples": [429, 500, 403],"label": "MCP error status","type": "Numeric"},"$mcp_error_type": {"description": "Failure category for an errored MCP tool call, for breaking failures down by reason. PostHog's server emits a semantic bucket (missing_context, validation, permission, timeout, rate_limited, api_4xx, api_5xx, internal); external servers using the SDK fall back to the thrown error's type. Only set when $mcp_is_error is true.",- "examples": [- "rate_limited",- "validation",- "timeout",- "api_4xx"- ],+ "examples": ["rate_limited", "validation", "timeout", "api_4xx"],"label": "MCP error type"},"$mcp_exec_inner_tool_names": {"description": "Array of every inner tool name available to the agent at the time of a tools/list request. Stored as a JSON array \u2014 filter with `contains` against a single tool name (e.g. 'execute-sql'). Only stamped on mcp_tools_list events when running in single-exec mode (in multi-tool mode the SDK's $mcp_listed_tool_names already carries the catalog). Lets you compute zombie tools by diffing against $mcp_exec_tool_call_name from mcp_tool_call events.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP exec inner tool catalog"},"$mcp_exec_target_tool": {"description": "The tool an exec info, schema, or call verb named, when it resolves to a tool in the server's catalog; `unrecognized` otherwise so the caller's own token is never recorded. Links an `info` read to the `call` that follows it.",- "examples": [- "experiment-get",- "unrecognized"- ],+ "examples": ["experiment-get", "unrecognized"],"label": "MCP exec target tool"},"$mcp_exec_tool_call_description": {"description": "In single-exec mode, $mcp_tool_name is always 'exec' (the dispatcher), so the SDK's $mcp_tool_description is the dispatcher's static text on every call. This property carries the description of the inner tool the agent was actually invoking via 'call <tool> ...' \u2014 derived server-side by parsing the exec command and looking the inner tool up in our catalog. Only present when an exec call targets a recognized inner tool.",- "examples": [- "Run a HogQL/SQL query against PostHog.",- "List feature flags in the project."- ],+ "examples": ["Run a HogQL/SQL query against PostHog.", "List feature flags in the project."],"label": "MCP exec inner tool description"},"$mcp_exec_tool_call_name": {"description": "In single-exec mode, $mcp_tool_name is always 'exec' (the dispatcher), so by itself it doesn't tell you which inner tool the agent was actually invoking. This property carries the inner tool's name \u2014 derived server-side by parsing the exec command's `call <tool> ...` form and looking it up in our catalog. Use it for breakdowns / funnels that should pivot on the real tool rather than the dispatcher. Only present when an exec call targets a recognized inner tool.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP exec inner tool name"},"$mcp_exec_verb": {"description": "Which exec dispatcher verb the request ran: tools, search, info, schema, call, learn, or `unrecognized` for a verb the server does not accept. Only set in exec mode ($mcp_mode).",- "examples": [- "call",- "info",- "unrecognized"- ],+ "examples": ["call", "info", "unrecognized"],"label": "MCP exec verb"},"$mcp_input_aliases_used": {"description": "Declared parameter aliases the call relied on, as `alias:canonical` (for example `experimentId:id`). Present only when the call did not send the canonical name and used one of its aliases instead. Both names come from the tool's own alias map. Recorded by the @posthog/mcp SDK helper. Measures how much traffic the alias layer rescues, and which spellings agents reach for.",- "examples": [- "experimentId:id",- "flagKey:key"- ],+ "examples": ["experimentId:id", "flagKey:key"],"label": "MCP input aliases used"},"$mcp_input_keys": {"description": "Top-level argument names the caller sent on a tool call, success or failure: every direct-mode call, `render-ui`, and an exec `call` (parsed from the command string). Exec discovery verbs (tools, search, info, schema) carry none, so rate against rows where it is set rather than every $mcp_tool_call. Recorded by the @posthog/mcp SDK helper: names the tool declares, including its aliases, capped at 20. Undeclared names become one `[redacted]` entry. Names only, never values. Group by it with $mcp_input_aliases_used to see how agents spell a parameter.",- "examples": [- "id",- "experimentId",- "filters, key, name"- ],+ "examples": ["id", "experimentId", "filters, key, name"],"label": "MCP input keys"},"$mcp_intent": {@@ -4800,10 +3722,7 @@},"$mcp_intent_source": {"description": "Where $mcp_intent came from. 'context_parameter' means the client supplied it directly on the call; 'inferred' means the MCP server derived it via its intentFallback.",- "examples": [- "context_parameter",- "inferred"- ],+ "examples": ["context_parameter", "inferred"],"label": "MCP intent source"},"$mcp_is_error": {@@ -4812,53 +3731,32 @@},"$mcp_listed_tool_names": {"description": "Array of every tool name advertised to the agent on a tools/list request, in multi-tool mode. Stored as a JSON array \u2014 filter with `contains` against a single tool name (e.g. 'execute-sql'). Lets you compute zombie tools (advertised but never called) by diffing against $mcp_tool_name from mcp_tool_call events. In single-exec mode the catalog rides on $mcp_exec_inner_tool_names instead. Only present on mcp_tools_list.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP listed tool names"},"$mcp_llm_model": {"description": "The model used by the MCP client for this tool call. Taken from recognized client metadata when available, otherwise from the agent's self-reported llm_model argument. MCP does not attest model identity, so use this for analytics rather than billing or access control.",- "examples": [- "claude-sonnet-5",- "gpt-5.6-sol"- ],+ "examples": ["claude-sonnet-5", "gpt-5.6-sol"],"label": "MCP model"},"$mcp_llm_model_missing_reason": {"description": "Why PostHog's MCP server captured no model identifier. missing means llm_model was omitted; unknown means the agent explicitly reported unknown; invalid means the argument was blank or not a string; not_captured means a nonempty report was not captured by the analytics SDK; capture_error means analytics preparation failed. Only set when no model was captured. Older events and other MCP servers may omit this property.",- "examples": [- "missing",- "unknown",- "invalid",- "not_captured",- "capture_error"- ],+ "examples": ["missing", "unknown", "invalid", "not_captured", "capture_error"],"label": "MCP model missing reason"},"$mcp_llm_model_source": {"description": "How the model identifier was obtained. client_metadata means the MCP client supplied recognized metadata. self_reported means the agent filled the injected llm_model argument. Both sources are unverified.",- "examples": [- "client_metadata",- "self_reported"- ],+ "examples": ["client_metadata", "self_reported"],"label": "MCP model source"},"$mcp_missing_scope": {"description": "The API scope the PostHog API said was missing when it refused an MCP request. Only set on $mcp_auth_failed with reason insufficient_scope, and only when the API named a specific scope.",- "examples": [- "insight:read",- "query:read"- ],+ "examples": ["insight:read", "query:read"],"label": "MCP missing scope"},"$mcp_mode": {"description": "Which tool-registration mode the MCP server ran in for this request. 'cli' is single-exec mode (the v2 wrapper that exposes one dispatcher tool taking a `call <tool> ...` command); 'tools' exposes every tool individually.",- "examples": [- "cli",- "tools"- ],+ "examples": ["cli", "tools"],"label": "MCP mode"},"$mcp_oauth_client_name": {@@ -4887,11 +3785,7 @@},"$mcp_protocol_version": {"description": "The MCP protocol revision the request was made under, such as 2025-11-25 or 2026-07-28.",- "examples": [- "2025-11-25",- "2025-06-18",- "2026-07-28"- ],+ "examples": ["2025-11-25", "2025-06-18", "2026-07-28"],"label": "MCP protocol version"},"$mcp_read_only": {@@ -4900,10 +3794,7 @@},"$mcp_region": {"description": "The PostHog cloud region the MCP server routed the request to.",- "examples": [- "us",- "eu"- ],+ "examples": ["us", "eu"],"label": "MCP region"},"$mcp_resource_name": {@@ -4916,27 +3807,17 @@},"$mcp_scope_preset": {"description": "Which kind of caller minted the token behind an MCP request, worked out from its scope set. 'scout' is a Signals scout run, 'research' is a read-only report-research run, 'implementation' is a write-capable implementation run, 'sandbox' is any other server-minted run (a task started from the desktop app or the pipeline before the scratchpad scopes tell research and implementation apart), and 'user' is a person's own token. Stamped on every event by PostHog's own MCP server. Use it to split scratchpad and notes usage by caller, for example to measure scout scratchpad adoption apart from ordinary users.",- "examples": [- "scout",- "research",- "implementation",- "sandbox",- "user"- ],+ "examples": ["scout", "research", "implementation", "sandbox", "user"],"label": "MCP scope preset"},"$mcp_server_build": {"description": "The exact immutable build identifier that the MCP host supplies, such as a Git commit SHA or container image digest. Use it to connect an event to deployed code when one server version has multiple builds.",- "examples": [- "b3b941584bae0123"- ],+ "examples": ["b3b941584bae0123"],"label": "MCP server build"},"$mcp_server_name": {"description": "The advertised name of the MCP server that handled the request.",- "examples": [- "PostHog"- ],+ "examples": ["PostHog"],"label": "MCP server name"},"$mcp_server_version": {@@ -4949,35 +3830,22 @@},"$mcp_skill_body_offset": {"description": "Where in a skill's body a `skill-get` started reading. Long bodies come back in slices, so one skill load is several calls that differ only by this offset, and a first read usually omits the offset \u2014 absent and 0 both mean a first page. Scope the query to `$mcp_tool_name IN ('skill-get', 'llma-skill-get')` before counting: the property is never set on `skill-file-get` or on a failed read, so an absent value outside that scope means 'never paginated' rather than 'first page', and counting it inflates loads. Within the scope, count calls where the offset is absent or 0 for loads, and every call for pages read. Set only on reads that succeeded, like `$mcp_skill_name`.",- "examples": [- "0",- "5000"- ],+ "examples": ["0", "5000"],"label": "MCP skill body offset"},"$mcp_skill_name": {"description": "The stored skill a skill-* read tool returned, on `skill-get` and `skill-file-get` (and their `llma-skill-*` aliases). Present only when the read succeeded, so counting these events counts skills that were actually delivered. A failed read carries no skill name, which stops a deleted skill that agents keep requesting from reading as a popular one. Recorded only when the value matches the shape the skills store enforces at creation, so a name the agent invented is left off rather than echoed. Skill writes are not stamped here; those emit `llma skill *` from the skills API.",- "examples": [- "prove-the-change",- "pr-shepherd"- ],+ "examples": ["prove-the-change", "pr-shepherd"],"label": "MCP skill name"},"$mcp_source": {"description": "Constant identifier for the analytics SDK that emitted the event. Lets you separate events from different SDK versions or unrelated MCP servers.",- "examples": [- "posthog_mcp_analytics"- ],+ "examples": ["posthog_mcp_analytics"],"label": "MCP source"},"$mcp_tool_category": {"description": "The product category the invoked tool belongs to \u2014 the grouping dimension the MCP analytics dashboard buckets tool calls by. Stamped server-side from the tool catalog (PostHog's server) or declared per tool (external servers). Omitted when the tool has no catalogued category (e.g. the `exec` dispatcher), which the dashboard buckets as 'Uncategorized'. Present on mcp_tool_call.",- "examples": [- "Error tracking",- "Logs",- "Feature flags",- "Session replays"- ],+ "examples": ["Error tracking", "Logs", "Feature flags", "Session replays"],"label": "MCP tool category"},"$mcp_tool_description": {@@ -4990,44 +3858,27 @@},"$mcp_tool_name": {"description": "The name of the MCP tool that was invoked. Only present on mcp_tool_call.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP tool name"},"$mcp_transport": {"description": "The transport the MCP client used to connect to the server.",- "examples": [- "stdio",- "sse",- "streamable-http"- ],+ "examples": ["stdio", "sse", "streamable-http"],"label": "MCP transport"},"$mcp_validation_fields": {"description": "Parameter paths the MCP server's own input schema rejected, as `path:code` (for example `id:invalid_type`). Names from the tool's schema, never caller values. Only set when the server rejected the input before calling PostHog.",- "examples": [- "id:invalid_type",- "filters.groups:required"- ],+ "examples": ["id:invalid_type", "filters.groups:required"],"label": "MCP validation fields"},"$mcp_vendor_client": {"description": "Vendor client header the MCP client sent on the transport (x-anthropic-client), captured raw. The strongest harness signal: clientInfo.name can't tell one vendor surface from another, but this header can.",- "examples": [- "ClaudeCode",- "ClaudeAI",- "Cowork"- ],+ "examples": ["ClaudeCode", "ClaudeAI", "Cowork"],"label": "MCP vendor client"},"$mcp_version": {"description": "Server-resolved MCP version. May differ from the version the client reported because of the mcp-version-2 feature flag.",- "examples": [- 1,- 2- ],+ "examples": [1, 2],"label": "MCP server version (internal)","type": "Numeric"}@@ -5035,43 +3886,31 @@"metadata": {"distinct_id": {"description": "The current distinct ID of the user.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Distinct ID"},"event": {"description": "The name of the event.",- "examples": [- "$pageview"- ],+ "examples": ["$pageview"],"ignored_in_assistant": true,"label": "Event","system": true},"person_id": {"description": "The ID of the person, depending on the person properties mode.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Person ID"},"person_mode": {"description": "The person mode determined during ingestion: full (identified user with properties), propertyless (anonymous user), or force_upgrade (anonymous event linked to an already identified user). Used in usage reports.",- "examples": [- "full",- "propertyless",- "force_upgrade"- ],+ "examples": ["full", "propertyless", "force_upgrade"],"ignored_in_assistant": true,"label": "Person mode","system": true},"timestamp": {"description": "Time the event happened.",- "examples": [- "2023-05-20T15:30:00Z"- ],+ "examples": ["2023-05-20T15:30:00Z"],"ignored_in_assistant": true,"label": "Timestamp","system": true@@ -5092,48 +3931,35 @@},"$active_feature_flags": {"description": "Keys of the feature flags that were active while this event was sent.",- "examples": [- "['beta-feature']"- ],+ "examples": ["['beta-feature']"],"label": "Active feature flags"},"$ai_agent_name": {"description": "The name of the AI agent that produced this event.",- "examples": [- "research_agent",- "support_bot"- ],+ "examples": ["research_agent", "support_bot"],"label": "AI agent name (LLM)"},"$ai_audio_cost_usd": {"description": "The cost in USD of the audio tokens for this LLM request.",- "examples": [- 0.0012- ],+ "examples": [0.0012],"label": "AI audio cost USD (LLM)","type": "Numeric"},"$ai_audio_input_tokens": {"description": "The number of audio tokens in the input sent to the LLM.",- "examples": [- 64- ],+ "examples": [64],"label": "AI audio input tokens (LLM)","type": "Numeric"},"$ai_audio_output_tokens": {"description": "The number of audio tokens generated by the LLM.",- "examples": [- 64- ],+ "examples": [64],"label": "AI audio output tokens (LLM)","type": "Numeric"},"$ai_base_url": {"description": "The base URL of the request made to the LLM API.",- "examples": [- "https://api.openai.com/v1/"- ],+ "examples": ["https://api.openai.com/v1/"],"label": "AI base URL (LLM)"},"$ai_billable": {@@ -5143,218 +3969,145 @@},"$ai_blob_bytes": {"description": "Total decoded size in bytes of the large binary payloads in this call.",- "examples": [- 245760- ],+ "examples": [245760],"label": "AI binary payload size (LLM)","type": "Numeric"},"$ai_blob_count": {"description": "Number of large binary payloads (images, audio, documents, or other base64 content) in this call.",- "examples": [- 2- ],+ "examples": [2],"label": "AI binary payload count (LLM)","type": "Numeric"},"$ai_cache_creation_1h_input_tokens": {"description": "The number of tokens created in the 1-hour prompt cache (Anthropic only).",- "examples": [- 23- ],+ "examples": [23],"label": "AI 1-hour cache creation input tokens (LLM)","type": "Numeric"},"$ai_cache_creation_5m_input_tokens": {"description": "The number of tokens created in the 5-minute prompt cache (Anthropic only).",- "examples": [- 23- ],+ "examples": [23],"label": "AI 5-minute cache creation input tokens (LLM)","type": "Numeric"},"$ai_cache_creation_input_tokens": {"description": "The number of tokens created in the cache for the input prompt.",- "examples": [- 23- ],+ "examples": [23],"label": "AI cache creation input tokens (LLM)"},"$ai_cache_read_audio_tokens": {"description": "The number of audio tokens read from the prompt cache.",- "examples": [- 16- ],+ "examples": [16],"label": "AI cache read audio tokens (LLM)","type": "Numeric"},"$ai_cache_read_input_tokens": {"description": "The number of tokens read from the cache for the input prompt.",- "examples": [- 23- ],+ "examples": [23],"label": "AI cache read input tokens (LLM)"},"$ai_cache_read_token_price": {"description": "The price per token read from the prompt cache.",- "examples": [- 3e-07- ],+ "examples": [3e-7],"label": "AI cache read token price (LLM)","type": "Numeric"},"$ai_cache_reporting_exclusive": {"description": "Whether cache tokens are excluded from the input token count. When true, cache tokens are separate from input tokens (Anthropic-style). When false, input tokens already include cache tokens. Auto-detected from provider when not set explicitly.",- "examples": [- true- ],+ "examples": [true],"label": "AI cache reporting exclusive (LLM)"},"$ai_cache_write_1h_token_price": {"description": "The price per token written to the 1-hour prompt cache. Set this to override PostHog's cost calculation for 1-hour cache writes.",- "examples": [- 6e-06- ],+ "examples": [6e-6],"label": "AI 1-hour cache write token price (LLM)","type": "Numeric"},"$ai_cache_write_token_price": {"description": "The price per token written to the prompt cache.",- "examples": [- 3.75e-06- ],+ "examples": [3.75e-6],"label": "AI cache write token price (LLM)","type": "Numeric"},"$ai_cost_model_provider": {"description": "The provider used to look up the cost for this model.",- "examples": [- "openai",- "anthropic",- "custom"- ],+ "examples": ["openai", "anthropic", "custom"],"label": "AI cost model provider (LLM)"},"$ai_cost_model_source": {"description": "Where the cost data for this model was sourced from.",- "examples": [- "openrouter",- "manual",- "custom",- "passthrough"- ],+ "examples": ["openrouter", "manual", "custom", "passthrough"],"label": "AI cost model source (LLM)"},"$ai_cost_passthrough": {"description": "Set this to keep the reported total cost and skip PostHog's token-based estimate. Use it when the provider reports an authoritative cost, such as an LLM gateway. The input and output cost split is left unset.",- "examples": [- true- ],+ "examples": [true],"label": "AI cost passthrough (LLM)"},"$ai_error": {"description": "The error message from a failed AI event.",- "examples": [- "Rate limit exceeded",- "Invalid API key"- ],+ "examples": ["Rate limit exceeded", "Invalid API key"],"label": "AI Error (LLM)"},"$ai_error_normalized": {"description": "A normalized version of the AI error message for grouping similar errors.",- "examples": [- "rate_limit_exceeded",- "invalid_api_key"- ],+ "examples": ["rate_limit_exceeded", "invalid_api_key"],"label": "AI Error Normalized (LLM)"},"$ai_error_type": {"description": "The type or class of the error from a failed AI event.",- "examples": [- "RateLimitError",- "AuthenticationError"- ],+ "examples": ["RateLimitError", "AuthenticationError"],"label": "AI Error Type (LLM)"},"$ai_eval_source": {"description": "The source that triggered this evaluation.",- "examples": [- "signals-grouping",- "sandboxed-agent",- "one-shot"- ],+ "examples": ["signals-grouping", "sandboxed-agent", "one-shot"],"label": "AI eval source (LLM)"},"$ai_evaluation_allows_na": {"description": "Whether the evaluation allows N/A responses when the criteria doesn't apply.",- "examples": [- true,- false- ],+ "examples": [true, false],"label": "AI Evaluation Allows N/A (LLM)"},"$ai_evaluation_applicable": {"description": "Whether the evaluation criteria was applicable to this generation (only present when N/A is allowed).",- "examples": [- true,- false- ],+ "examples": [true, false],"label": "AI Evaluation Applicable (LLM)"},"$ai_evaluation_categorical_result": {"description": "The category keys returned by an online evaluation. An empty list is an applicable result with no matching categories.",- "examples": [- "[\"resolved\"]",- "[\"fast\", \"reliable\"]",- "[]"- ],+ "examples": ["[\"resolved\"]", "[\"fast\", \"reliable\"]", "[]"],"label": "AI evaluation categorical result"},"$ai_evaluation_id": {"description": "The unique identifier of the evaluation configuration used to judge the AI event.",- "examples": [- "550e8400-e29b-41d4-a716-446655440000"- ],+ "examples": ["550e8400-e29b-41d4-a716-446655440000"],"label": "AI Evaluation ID (LLM)"},"$ai_evaluation_key_id": {"description": "The ID of the LLM provider key used for the evaluation.",- "examples": [- "550e8400-e29b-41d4-a716-446655440000"- ],+ "examples": ["550e8400-e29b-41d4-a716-446655440000"],"label": "AI Evaluation Key ID (LLM)"},"$ai_evaluation_key_type": {"description": "The type of API key used for the evaluation (byok = user's own key, posthog = PostHog default).",- "examples": [- "byok",- "posthog"- ],+ "examples": ["byok", "posthog"],"label": "AI Evaluation Key Type (LLM)"},"$ai_evaluation_model": {"description": "The LLM model used as the judge for the evaluation.",- "examples": [- "gpt-4",- "claude-3-opus"- ],+ "examples": ["gpt-4", "claude-3-opus"],"label": "AI Evaluation Model (LLM)"},"$ai_evaluation_name": {"description": "The name of the evaluation configuration used.",- "examples": [- "Factual accuracy check",- "Response relevance"- ],+ "examples": ["Factual accuracy check", "Response relevance"],"label": "AI Evaluation Name (LLM)"},"$ai_evaluation_numeric_result": {"description": "The raw numeric score returned by an online evaluation.",- "examples": [- 0,- 0.75,- 10- ],+ "examples": [0, 0.75, 10],"label": "AI evaluation numeric result","type": "Numeric"},@@ -5369,59 +4122,39 @@"type": "Numeric"},"$ai_evaluation_probability": {- "description": "The probability of a true verdict for a boolean evaluation.",- "examples": [- 0.9- ],+ "description": "The probability of a true verdict for a boolean evaluation.",+ "examples": [0.9],"label": "AI evaluation probability","type": "Numeric"},"$ai_evaluation_provider": {"description": "The LLM provider used as the judge (e.g., openai, anthropic, gemini).",- "examples": [- "openai",- "anthropic",- "gemini"- ],+ "examples": ["openai", "anthropic", "gemini"],"label": "AI Evaluation Provider (LLM)"},"$ai_evaluation_reasoning": {"description": "The LLM's explanation for why the evaluation passed or failed.",- "examples": [- "The response accurately addresses the query",- "The output contains factual inaccuracies"- ],+ "examples": ["The response accurately addresses the query", "The output contains factual inaccuracies"],"label": "AI Evaluation Reasoning (LLM)"},"$ai_evaluation_result": {"description": "The boolean verdict of the evaluation (true = pass, false = fail).",- "examples": [- true,- false- ],+ "examples": [true, false],"label": "AI Evaluation Result (LLM)"},"$ai_evaluation_runtime": {"description": "The runtime used to execute the evaluation (e.g., llm_judge for LLM-based, hog for code-based).",- "examples": [- "llm_judge",- "hog"- ],+ "examples": ["llm_judge", "hog"],"label": "AI Evaluation Runtime (LLM)"},"$ai_evaluation_start_time": {"description": "The timestamp when the evaluation started executing.",- "examples": [- "2025-01-15T10:30:00Z"- ],+ "examples": ["2025-01-15T10:30:00Z"],"label": "AI Evaluation Start Time (LLM)"},"$ai_evaluation_type": {"description": "The type of evaluation that was run.",- "examples": [- "llm_judge",- "hog"- ],+ "examples": ["llm_judge", "hog"],"label": "AI evaluation type (LLM)"},"$ai_expected": {@@ -5446,87 +4179,61 @@},"$ai_feedback_text": {"description": "The text provided by the user for feedback on the LLM trace.",- "examples": [- "\"The response was helpful, but it did not use the provided context.\""- ],+ "examples": ["\"The response was helpful, but it did not use the provided context.\""],"label": "AI Feedback Text (LLM)"},"$ai_framework": {"description": "The AI framework used to produce this event.",- "examples": [- "langchain",- "llamaindex",- "openai"- ],+ "examples": ["langchain", "llamaindex", "openai"],"label": "AI framework (LLM)"},"$ai_git_branch": {"description": "The git branch checked out when the AI generation ran.",- "examples": [- "feat/my-feature"- ],+ "examples": ["feat/my-feature"],"label": "AI git branch"},"$ai_git_repo": {"description": "The repository that AI interacted with, as owner/name.",- "examples": [- "PostHog/posthog"- ],+ "examples": ["PostHog/posthog"],"label": "AI git repository"},"$ai_http_status": {"description": "The HTTP status code of the request made to the LLM API.",- "examples": [- 200,- 429- ],+ "examples": [200, 429],"label": "AI HTTP status (LLM)"},"$ai_image_cost_usd": {"description": "The cost in USD of the image tokens for this LLM request.",- "examples": [- 0.004- ],+ "examples": [0.004],"label": "AI image cost USD (LLM)","type": "Numeric"},"$ai_image_input_tokens": {"description": "The number of image tokens in the input sent to the LLM.",- "examples": [- 256- ],+ "examples": [256],"label": "AI image input tokens (LLM)","type": "Numeric"},"$ai_image_output_tokens": {"description": "The number of image tokens generated by the LLM.",- "examples": [- 256- ],+ "examples": [256],"label": "AI image output tokens (LLM)","type": "Numeric"},"$ai_ingestion_source": {"description": "How the LLM analytics event was ingested.",- "examples": [- "otel",- "sdk"- ],+ "examples": ["otel", "sdk"],"label": "AI ingestion source (LLM)","type": "String"},"$ai_input": {"description": "The input JSON that was sent to the LLM API.",- "examples": [- "{\"content\": \"Explain quantum computing in simple terms.\", \"role\": \"user\"}"- ],+ "examples": ["{\"content\": \"Explain quantum computing in simple terms.\", \"role\": \"user\"}"],"label": "AI input (LLM)"},"$ai_input_cost_usd": {"description": "The cost in USD of the input tokens sent to the LLM API.",- "examples": [- 0.0017- ],+ "examples": [0.0017],"label": "AI input cost USD (LLM)"},"$ai_input_state": {@@ -5535,39 +4242,28 @@},"$ai_input_token_price": {"description": "The price per input token used to compute the input cost. Set this to override PostHog's cost calculation.",- "examples": [- 3e-06- ],+ "examples": [3e-6],"label": "AI input token price (LLM)","type": "Numeric"},"$ai_input_tokens": {"description": "The number of tokens in the input prompt that was sent to the LLM API.",- "examples": [- 23- ],+ "examples": [23],"label": "AI input tokens (LLM)"},"$ai_is_error": {"description": "Whether this AI event resulted in an error.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "AI Is Error (LLM)"},"$ai_latency": {"description": "The latency of the request made to the LLM API, in seconds.",- "examples": [- 0.361- ],+ "examples": [0.361],"label": "AI latency (LLM)"},"$ai_lib": {"description": "The name of the SDK or library that sent this AI event.",- "examples": [- "posthog-python"- ],+ "examples": ["posthog-python"],"label": "AI library (LLM)","system": true},@@ -5578,27 +4274,18 @@},"$ai_max_tokens": {"description": "The maximum number of tokens the model was allowed to generate.",- "examples": [- 1024,- 4096- ],+ "examples": [1024, 4096],"label": "AI max tokens (LLM)","type": "Numeric"},"$ai_metric_name": {"description": "The name assigned to the metric used to evaluate the LLM trace.",- "examples": [- "rating",- "accuracy"- ],+ "examples": ["rating", "accuracy"],"label": "AI Metric Name (LLM)"},"$ai_metric_value": {"description": "The value assigned to the metric used to evaluate the LLM trace.",- "examples": [- "negative",- "95"- ],+ "examples": ["negative", "95"],"label": "AI Metric Value (LLM)"},"$ai_metric_version": {@@ -5607,23 +4294,17 @@},"$ai_model": {"description": "The model used to generate the output from the LLM API.",- "examples": [- "gpt-4o-mini"- ],+ "examples": ["gpt-4o-mini"],"label": "AI model (LLM)"},"$ai_model_cost_used": {"description": "The model identifier used for cost calculation. May differ from the requested model when a variant or alias is resolved.",- "examples": [- "openai/gpt-4o-mini"- ],+ "examples": ["openai/gpt-4o-mini"],"label": "AI model cost used (LLM)"},"$ai_model_parameters": {"description": "The parameters used to configure the model in the LLM API, in JSON.",- "examples": [- "{\"temperature\": 0.5, \"max_tokens\": 50}"- ],+ "examples": ["{\"temperature\": 0.5, \"max_tokens\": 50}"],"label": "AI model parameters (LLM)"},"$ai_output": {@@ -5639,9 +4320,7 @@},"$ai_output_cost_usd": {"description": "The cost in USD of the output tokens received from the LLM API.",- "examples": [- 0.0024- ],+ "examples": [0.0024],"label": "AI output cost USD (LLM)"},"$ai_output_state": {@@ -5650,24 +4329,18 @@},"$ai_output_token_price": {"description": "The price per output token used to compute the output cost. Set this to override PostHog's cost calculation.",- "examples": [- 1.5e-05- ],+ "examples": [1.5e-5],"label": "AI output token price (LLM)","type": "Numeric"},"$ai_output_tokens": {"description": "The number of tokens in the output from the LLM API.",- "examples": [- 23- ],+ "examples": [23],"label": "AI output tokens (LLM)"},"$ai_parent_id": {"description": "The parent span ID of a span or generation, used to group a trace into a tree view.",- "examples": [- "bdf42359-9364-4db7-8958-c001f28c9255"- ],+ "examples": ["bdf42359-9364-4db7-8958-c001f28c9255"],"label": "AI Parent ID (LLM)"},"$ai_project_name": {@@ -5676,17 +4349,13 @@},"$ai_prompt_name": {"description": "The name of the managed prompt used for this LLM request.",- "examples": [- "support-classifier"- ],+ "examples": ["support-classifier"],"label": "AI prompt name (LLM)","type": "String"},"$ai_prompt_version": {"description": "The version of the managed prompt used for this LLM request.",- "examples": [- "3"- ],+ "examples": ["3"],"label": "AI prompt version (LLM)","type": "String"},@@ -5697,9 +4366,7 @@},"$ai_provider": {"description": "The provider of the AI model used to generate the output from the LLM API.",- "examples": [- "openai"- ],+ "examples": ["openai"],"label": "AI Provider (LLM)"},"$ai_reasoning": {@@ -5709,48 +4376,34 @@},"$ai_reasoning_tokens": {"description": "The number of tokens in the reasoning output from the LLM API.",- "examples": [- 23- ],+ "examples": [23],"label": "AI reasoning tokens (LLM)"},"$ai_request_cost_usd": {"description": "The per-request cost in USD charged by the LLM API, independent of token usage.",- "examples": [- 0.005- ],+ "examples": [0.005],"label": "AI request cost USD (LLM)"},"$ai_request_count": {"description": "The number of requests made to the LLM provider for this generation.",- "examples": [- 1- ],+ "examples": [1],"label": "AI request count (LLM)","type": "Numeric"},"$ai_request_price": {"description": "The flat per-request price charged by the LLM provider, independent of token usage.",- "examples": [- 0.0001- ],+ "examples": [0.0001],"label": "AI request price (LLM)","type": "Numeric"},"$ai_request_url": {"description": "The full URL of the request made to the LLM API.",- "examples": [- "https://api.openai.com/v1/chat/completions"- ],+ "examples": ["https://api.openai.com/v1/chat/completions"],"label": "AI Request URL (LLM)"},"$ai_result_type": {"description": "The type of result for this evaluation metric.",- "examples": [- "binary",- "numeric",- "categorical"- ],+ "examples": ["binary", "numeric", "categorical"],"label": "AI result type (LLM)"},"$ai_score": {@@ -5770,199 +4423,130 @@},"$ai_session_id": {"description": "Groups related traces together in a session (e.g., a conversation or workflow). One session can contain many traces.",- "examples": [- "session-abc-123",- "conv-user-456"- ],+ "examples": ["session-abc-123", "conv-user-456"],"label": "AI Session ID (LLM)"},"$ai_span_id": {"description": "The unique identifier for a LLM trace, generation, or span.",- "examples": [- "bdf42359-9364-4db7-8958-c001f28c9255"- ],+ "examples": ["bdf42359-9364-4db7-8958-c001f28c9255"],"label": "AI Span ID (LLM)"},"$ai_span_name": {"description": "The name given to this LLM trace, generation, or span.",- "examples": [- "summarize_text"- ],+ "examples": ["summarize_text"],"label": "AI Span Name (LLM)"},"$ai_span_type": {"description": "The type of this span in the AI trace tree.",- "examples": [- "agent",- "tool",- "chain",- "retriever"- ],+ "examples": ["agent", "tool", "chain", "retriever"],"label": "AI span type (LLM)"},"$ai_status": {"description": "The status of this evaluation.",- "examples": [- "ok",- "error"- ],+ "examples": ["ok", "error"],"label": "AI status (LLM)"},"$ai_stop_reason": {"description": "The reason the LLM stopped generating tokens.",- "examples": [- "end_turn",- "max_tokens",- "stop_sequence"- ],+ "examples": ["end_turn", "max_tokens", "stop_sequence"],"label": "AI stop reason (LLM)"},"$ai_stream": {"description": "Whether the response from the LLM API was streamed.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "AI stream (LLM)"},"$ai_tag_count": {"description": "The number of tags assigned to the AI event.",- "examples": [- 1,- 3- ],+ "examples": [1, 3],"label": "AI Tag Count (LLM)"},"$ai_tag_reasoning": {"description": "The LLM's explanation for why it assigned the selected tags.",- "examples": [- "The generation discussed billing and feature flag configuration"- ],+ "examples": ["The generation discussed billing and feature flag configuration"],"label": "AI Tag Reasoning (LLM)"},"$ai_tagger_id": {"description": "The unique identifier of the tagger configuration used to classify the AI event.",- "examples": [- "550e8400-e29b-41d4-a716-446655440000"- ],+ "examples": ["550e8400-e29b-41d4-a716-446655440000"],"label": "AI Tagger ID (LLM)"},"$ai_tagger_key_id": {"description": "The ID of the LLM provider key used for the tagger.",- "examples": [- "550e8400-e29b-41d4-a716-446655440000"- ],+ "examples": ["550e8400-e29b-41d4-a716-446655440000"],"label": "AI Tagger Key ID (LLM)"},"$ai_tagger_key_type": {"description": "The type of API key used for the tagger (byok = user's own key, posthog = PostHog default).",- "examples": [- "byok",- "posthog"- ],+ "examples": ["byok", "posthog"],"label": "AI Tagger Key Type (LLM)"},"$ai_tagger_name": {"description": "The name of the tagger configuration used.",- "examples": [- "Product feature tagger",- "Intent classifier"- ],+ "examples": ["Product feature tagger", "Intent classifier"],"label": "AI Tagger Name (LLM)"},"$ai_tagger_start_time": {"description": "The timestamp when the tagger started executing.",- "examples": [- "2025-01-15T10:30:00Z"- ],+ "examples": ["2025-01-15T10:30:00Z"],"label": "AI Tagger Start Time (LLM)"},"$ai_tags": {"description": "The list of tags assigned to the AI event by the tagger.",- "examples": [- "billing",- "feature-flags",- "onboarding"- ],+ "examples": ["billing", "feature-flags", "onboarding"],"label": "AI Tags (LLM)"},"$ai_target_event_id": {"description": "Deprecated \u2014 use $ai_target_id with $ai_target_type instead. The unique identifier of the event being evaluated.",- "examples": [- "c9222e05-8708-41b8-98ea-d4a21849e761"- ],+ "examples": ["c9222e05-8708-41b8-98ea-d4a21849e761"],"label": "AI Target Event ID (LLM)"},"$ai_target_event_type": {"description": "Deprecated \u2014 use $ai_target_type instead. The type of event being evaluated (e.g., $ai_generation).",- "examples": [- "$ai_generation",- "$ai_span"- ],+ "examples": ["$ai_generation", "$ai_span"],"label": "AI Target Event Type (LLM)"},"$ai_target_id": {"description": "Identifier of the entity this evaluation targets. Pair with $ai_target_type to know which ID space it belongs to (event UUID, trace ID, etc.).",- "examples": [- "c9222e05-8708-41b8-98ea-d4a21849e761"- ],+ "examples": ["c9222e05-8708-41b8-98ea-d4a21849e761"],"label": "AI Target ID (LLM)"},"$ai_target_type": {"description": "ID space of $ai_target_id. `generation_uuid` resolves against `events.uuid`, `trace_id` resolves against the `$ai_trace_id` property, and `session_id` resolves against the `$ai_session_id` property.",- "examples": [- "generation_uuid",- "trace_id",- "session_id"- ],+ "examples": ["generation_uuid", "trace_id", "session_id"],"label": "AI Target Type (LLM)"},"$ai_temperature": {"description": "The temperature parameter used in the request to the LLM API.",- "examples": [- 0.7,- 1.0- ],+ "examples": [0.7, 1.0],"label": "AI temperature (LLM)"},"$ai_text_input_tokens": {"description": "The number of text tokens in the input prompt sent to the LLM.",- "examples": [- 128- ],+ "examples": [128],"label": "AI text input tokens (LLM)","type": "Numeric"},"$ai_text_output_tokens": {"description": "The number of text tokens generated by the LLM.",- "examples": [- 42- ],+ "examples": [42],"label": "AI text output tokens (LLM)","type": "Numeric"},"$ai_time_to_first_token": {"description": "The time in seconds from request start until the first token was received. Only applicable for streaming responses.",- "examples": [- 0.125,- 0.5- ],+ "examples": [0.125, 0.5],"label": "AI time to first token (LLM)"},"$ai_tokens_source": {"description": "The source of the token count data for this generation.",- "examples": [- "api_response",- "estimated"- ],+ "examples": ["api_response", "estimated"],"label": "AI tokens source (LLM)","system": true},"$ai_tool_call_count": {"description": "The number of tool calls made by the LLM in this generation.",- "examples": [- "2"- ],+ "examples": ["2"],"label": "AI Tool Call Count (LLM)"},"$ai_tools": {@@ -5974,16 +4558,12 @@},"$ai_tools_called": {"description": "The names of tools called by the LLM in this generation.",- "examples": [- "get_weather,search_docs"- ],+ "examples": ["get_weather,search_docs"],"label": "AI Tools Called (LLM)"},"$ai_total_cost_usd": {"description": "The total cost in USD of the request made to the LLM API (input + output costs).",- "examples": [- 0.0041- ],+ "examples": [0.0041],"label": "AI total cost USD (LLM)"},"$ai_total_input_tokens": {@@ -6003,17 +4583,12 @@},"$ai_trace_id": {"description": "The trace ID of the request made to the LLM API. Used to group together multiple generations into a single trace.",- "examples": [- "c9222e05-8708-41b8-98ea-d4a21849e761"- ],+ "examples": ["c9222e05-8708-41b8-98ea-d4a21849e761"],"label": "AI Trace ID (LLM)"},"$ai_trace_name": {"description": "The name given to this AI trace. Deprecated in favor of $ai_span_name.",- "examples": [- "summarize_text",- "chat_completion"- ],+ "examples": ["summarize_text", "chat_completion"],"label": "AI Trace Name (LLM)"},"$ai_user_prompt": {@@ -6022,56 +4597,42 @@},"$ai_video_cost_usd": {"description": "The cost in USD of the video tokens for this LLM request.",- "examples": [- 0.01- ],+ "examples": [0.01],"label": "AI video cost USD (LLM)","type": "Numeric"},"$ai_video_input_tokens": {"description": "The number of video tokens in the input sent to the LLM.",- "examples": [- 512- ],+ "examples": [512],"label": "AI video input tokens (LLM)","type": "Numeric"},"$ai_video_output_tokens": {"description": "The number of video tokens generated by the LLM.",- "examples": [- 512- ],+ "examples": [512],"label": "AI video output tokens (LLM)","type": "Numeric"},"$ai_web_search_cost_usd": {"description": "The cost in USD of web searches performed during the LLM API request.",- "examples": [- 0.005- ],+ "examples": [0.005],"label": "AI web search cost USD (LLM)"},"$ai_web_search_count": {"description": "The number of web searches the LLM provider performed for this generation.",- "examples": [- 2- ],+ "examples": [2],"label": "AI web search count (LLM)","type": "Numeric"},"$ai_web_search_price": {"description": "The price per web search performed by the LLM provider.",- "examples": [- 0.01- ],+ "examples": [0.01],"label": "AI web search price (LLM)","type": "Numeric"},"$anon_distinct_id": {"description": "If the user was previously anonymous, their anonymous ID will be set here.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Anon distinct ID","system": true},@@ -6085,9 +4646,7 @@},"$app_namespace": {"description": "The namespace of the app as identified in the app store. Data from the last time this user was seen.",- "examples": [- "com.posthog.app"- ],+ "examples": ["com.posthog.app"],"label": "Latest app namespace"},"$app_version": {@@ -6102,44 +4661,27 @@},"$browser": {"description": "Name of the browser the user has used. Data from the last time this user was seen.",- "examples": [- "Chrome",- "Firefox"- ],+ "examples": ["Chrome", "Firefox"],"label": "Latest browser"},"$browser_language": {"description": "Language.",- "examples": [- "en",- "en-US",- "cn",- "pl-PL"- ],+ "examples": ["en", "en-US", "cn", "pl-PL"],"label": "Browser language"},"$browser_language_prefix": {"description": "Language prefix.",- "examples": [- "en",- "ja"- ],+ "examples": ["en", "ja"],"label": "Browser language prefix"},"$browser_type": {"description": "This is only added when posthog-js config.opt_out_useragent_filter is true.",- "examples": [- "browser",- "bot"- ],+ "examples": ["browser", "bot"],"label": "Browser type"},"$browser_version": {"description": "The version of the browser that was used. Used in combination with Browser. Data from the last time this user was seen.",- "examples": [- "70",- "79"- ],+ "examples": ["70", "79"],"label": "Latest browser version"},"$capture_failed_request": {@@ -6154,61 +4696,37 @@},"$client_session_initial_pathname": {"description": "Path that the user started their session on. (First-touch, session-scoped)",- "examples": [- "/register",- "/some/landing/page"- ],+ "examples": ["/register", "/some/landing/page"],"label": "Initial path"},"$client_session_initial_referring_host": {"description": "Host that the user came from. (First-touch, session-scoped)",- "examples": [- "google.com",- "facebook.com"- ],+ "examples": ["google.com", "facebook.com"],"label": "Referrer host"},"$client_session_initial_utm_campaign": {"description": "UTM Campaign. (First-touch, session-scoped)",- "examples": [- "feature launch",- "discount"- ],+ "examples": ["feature launch", "discount"],"label": "Initial UTM campaign"},"$client_session_initial_utm_content": {"description": "UTM Source. (First-touch, session-scoped)",- "examples": [- "bottom link",- "second button"- ],+ "examples": ["bottom link", "second button"],"label": "Initial UTM source"},"$client_session_initial_utm_medium": {"description": "UTM Medium. (First-touch, session-scoped)",- "examples": [- "Social",- "Organic",- "Paid",- "Email"- ],+ "examples": ["Social", "Organic", "Paid", "Email"],"label": "Initial UTM medium"},"$client_session_initial_utm_source": {"description": "UTM Source. (First-touch, session-scoped)",- "examples": [- "Google",- "Bing",- "Twitter",- "Facebook"- ],+ "examples": ["Google", "Bing", "Twitter", "Facebook"],"label": "Initial UTM source"},"$client_session_initial_utm_term": {"description": "UTM term. (First-touch, session-scoped)",- "examples": [- "free goodies"- ],+ "examples": ["free goodies"],"label": "Initial UTM term"},"$config_defaults": {@@ -6219,9 +4737,7 @@},"$configured_session_timeout_ms": {"description": "Configured session timeout in milliseconds.",- "examples": [- "1800000"- ],+ "examples": ["1800000"],"label": "Configured session timeout","system": true,"used_for_debug": true@@ -6252,70 +4768,48 @@},"$copy_type": {"description": "Type of copy event.",- "examples": [- "copy",- "cut"- ],+ "examples": ["copy", "cut"],"ignored_in_assistant": true,"label": "Copy type"},"$creator_event_uuid": {"description": "Unique ID for the event, which created this person.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Creator event ID"},"$csp_blocked_url": {"description": "The URL that was blocked by the CSP policy.",- "examples": [- "https://malicious-site.com/script.js"- ],+ "examples": ["https://malicious-site.com/script.js"],"label": "Blocked URL"},"$csp_column_number": {"description": "The column number in the source file where the violation occurred.",- "examples": [- "13"- ],+ "examples": ["13"],"label": "Column number"},"$csp_disposition": {"description": "The disposition of the CSP policy that was violated (enforce or report).",- "examples": [- "enforce",- "report"- ],+ "examples": ["enforce", "report"],"label": "Disposition"},"$csp_document_url": {"description": "The URL of the document where the violation occurred.",- "examples": [- "https://example.com/page"- ],+ "examples": ["https://example.com/page"],"label": "Document URL"},"$csp_effective_directive": {"description": "The CSP directive that was effectively violated.",- "examples": [- "script-src",- "img-src",- "default-src"- ],+ "examples": ["script-src", "img-src", "default-src"],"label": "Effective directive"},"$csp_line_number": {"description": "The line number in the source file where the violation occurred.",- "examples": [- "42"- ],+ "examples": ["42"],"label": "Line number"},"$csp_original_policy": {"description": "The CSP policy that was active when the violation occurred.",- "examples": [- "default-src 'self'; script-src 'self' example.com"- ],+ "examples": ["default-src 'self'; script-src 'self' example.com"],"label": "Original policy"},"$csp_raw_report": {@@ -6324,9 +4818,7 @@},"$csp_referrer": {"description": "The referrer of the CSP report if available.",- "examples": [- "https://example.com/referrer"- ],+ "examples": ["https://example.com/referrer"],"label": "CSP Referrer"},"$csp_report_type": {@@ -6335,47 +4827,32 @@},"$csp_script_sample": {"description": "An escaped sample of the script that caused the violation. Usually capped at 40 characters.",- "examples": [- "eval('alert(1)')"- ],+ "examples": ["eval('alert(1)')"],"label": "Script sample"},"$csp_source_file": {"description": "The source file where the violation occurred.",- "examples": [- "script.js"- ],+ "examples": ["script.js"],"label": "Source file"},"$csp_status_code": {"description": "The HTTP status code that was returned when trying to load the blocked resource.",- "examples": [- "200",- "404"- ],+ "examples": ["200", "404"],"label": "Status code"},"$csp_version": {"description": "The version of the CSP policy. Must be provided in the report URL.",- "examples": [- "1.0"- ],+ "examples": ["1.0"],"label": "CSP Policy version"},"$csp_violated_directive": {"description": "The CSP directive that was violated.",- "examples": [- "script-src",- "img-src",- "default-src"- ],+ "examples": ["script-src", "img-src", "default-src"],"label": "Violated directive"},"$current_url": {"description": "The URL visited at the time of the event. Data from the last time this user was seen.",- "examples": [- "https://example.com/interesting-article?parameter=true"- ],+ "examples": ["https://example.com/interesting-article?parameter=true"],"label": "Latest current URL"},"$cymbal_errors": {@@ -6461,66 +4938,43 @@},"$device": {"description": "The mobile device that was used.",- "examples": [- "iPad",- "iPhone",- "Android"- ],+ "examples": ["iPad", "iPhone", "Android"],"label": "Device"},"$device_id": {"description": "Unique ID for that device, consistent even if users are logging in/out.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Device ID","system": true},"$device_manufacturer": {"description": "The manufacturer of the device",- "examples": [- "Apple",- "Samsung"- ],+ "examples": ["Apple", "Samsung"],"label": "Device manufacturer"},"$device_model": {"description": "The model of the device that was used.",- "examples": [- "iPhone9,3",- "SM-G965W"- ],+ "examples": ["iPhone9,3", "SM-G965W"],"label": "Device model"},"$device_name": {"description": "Name of the device",- "examples": [- "iPhone 12 Pro",- "Samsung Galaxy 10"- ],+ "examples": ["iPhone 12 Pro", "Samsung Galaxy 10"],"label": "Device name"},"$device_type": {"description": "The type of device that was used. Data from the last time this user was seen.",- "examples": [- "Mobile",- "Tablet",- "Desktop"- ],+ "examples": ["Mobile", "Tablet", "Desktop"],"label": "Latest device type"},"$el_text": {"description": "The text of the element that was clicked. Only sent with Autocapture events.",- "examples": [- "Click here!"- ],+ "examples": ["Click here!"],"label": "Element text"},"$enabled_feature_flags": {"description": "Keys and multivariate values of the feature flags that were active while this event was sent.",- "examples": [- "{\"flag\": \"value\"}"- ],+ "examples": ["{\"flag\": \"value\"}"],"label": "Enabled feature flags"},"$event_time_override_provided": {@@ -6537,11 +4991,7 @@},"$event_type": {"description": "When the event is an $autocapture event, this specifies what the action was against the element.",- "examples": [- "click",- "submit",- "change"- ],+ "examples": ["click", "submit", "change"],"label": "Event type"},"$exception_capture_enabled_server_side": {@@ -6575,9 +5025,7 @@},"$exception_level": {"description": "Exception categorized by severity.",- "examples": [- "error"- ],+ "examples": ["error"],"label": "Exception level"},"$exception_list": {@@ -6592,11 +5040,7 @@},"$exception_source": {"description": "The SDK integration or runtime hook that captured the exception.",- "examples": [- "panic",- "rails",- "php_exception_handler"- ],+ "examples": ["panic", "rails", "php_exception_handler"],"label": "Exception capture source"},"$exception_sources": {@@ -6610,9 +5054,7 @@},"$exception_types": {"description": "The type of the exception.",- "examples": [- "TypeError"- ],+ "examples": ["TypeError"],"label": "Exception type"},"$exception_values": {@@ -6621,32 +5063,24 @@},"$external_click_url": {"description": "The URL of an external link that was clicked during autocapture. External meaning the URL points to a different host than the page the user was on.",- "examples": [- "https://example.com/some-article"- ],+ "examples": ["https://example.com/some-article"],"label": "External click URL"},"$fbc": {"description": "The Facebook click ID in the format Meta's Conversions API expects, built when PostHog saw the fbclid so it carries the time of the ad click. Equivalent to the `_fbc` cookie the Meta pixel sets.",- "examples": [- "fb.1.1735689600000.IwAR2xY9zAbCdEf"- ],+ "examples": ["fb.1.1735689600000.IwAR2xY9zAbCdEf"],"label": "Facebook click ID (fbc)","type": "String"},"$fbp": {"description": "The Facebook browser ID that Meta's Conversions API uses to match a conversion to a browser, read from the `_fbp` cookie the Meta pixel sets.",- "examples": [- "fb.1.1735689600000.1098115397"- ],+ "examples": ["fb.1.1735689600000.1098115397"],"label": "Facebook browser ID (fbp)","type": "String"},"$feature_flag": {"description": "The key of the feature flag, sent on \"Feature flag called\", \"Experiment exposure\", and \"Feature enrollment\" events. To find other events where a flag was active, use \"Active feature flags\".",- "examples": [- "beta-feature"- ],+ "examples": ["beta-feature"],"label": "Feature flag"},"$feature_flag_bootstrapped_payload": {@@ -6664,24 +5098,17 @@},"$feature_flag_evaluated_at": {"description": "The timestamp (in milliseconds since Unix epoch) when the feature flag was evaluated.",- "examples": [- "1732051200000"- ],+ "examples": ["1732051200000"],"label": "Feature flag evaluated at"},"$feature_flag_has_experiment": {"description": "Whether the feature flag that was called is linked to a live experiment.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Feature flag has experiment"},"$feature_flag_id": {"description": "The numeric identifier of the feature flag that was called.",- "examples": [- "1234"- ],+ "examples": ["1234"],"label": "Feature flag ID"},"$feature_flag_original_response": {@@ -6689,10 +5116,8 @@"label": "Feature flag original response"},"$feature_flag_payload": {- "description": "The JSON payload that the call to feature flag responded with (if any)",- "examples": [- "{\"variant\": \"test\"}"- ],+ "description": "The JSON payload that the call to feature flag responded with (if any)",+ "examples": ["{\"variant\": \"test\"}"],"label": "Feature flag response payload"},"$feature_flag_payloads": {@@ -6702,97 +5127,62 @@},"$feature_flag_reason": {"description": "The reason the feature flag was matched or not matched.",- "examples": [- "Matched condition set 1"- ],+ "examples": ["Matched condition set 1"],"label": "Feature flag evaluation reason"},"$feature_flag_request_id": {"description": "The unique identifier for the request that retrieved this feature flag result.\n\nNote: Primarily used by PostHog support for debugging issues with feature flags.",- "examples": [- "01234567-89ab-cdef-0123-456789abcdef"- ],+ "examples": ["01234567-89ab-cdef-0123-456789abcdef"],"label": "Feature flag request ID"},"$feature_flag_response": {"description": "What the call to feature flag responded with.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Feature flag response"},"$feature_flag_version": {"description": "The version of the feature flag that was called.",- "examples": [- "3"- ],+ "examples": ["3"],"label": "Feature flag version"},"$geoip_accuracy_radius": {"description": "Accuracy radius of the location matched to this event's IP address (in kilometers). Data from the last time this user was seen.",- "examples": [- "50"- ],+ "examples": ["50"],"label": "Latest GeoIP detection accuracy radius"},"$geoip_city_confidence": {"description": "Confidence level of the city matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "0.5"- ],+ "examples": ["0.5"],"label": "Latest GeoIP detection city confidence"},"$geoip_city_name": {"description": "Name of the city matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "Sydney",- "Chennai",- "Brooklyn"- ],+ "examples": ["Sydney", "Chennai", "Brooklyn"],"label": "Latest city name"},"$geoip_continent_code": {"description": "Code of the continent matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "OC",- "AS",- "NA"- ],+ "examples": ["OC", "AS", "NA"],"label": "Latest continent code"},"$geoip_continent_name": {"description": "Name of the continent matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "Oceania",- "Asia",- "North America"- ],+ "examples": ["Oceania", "Asia", "North America"],"label": "Latest continent name"},"$geoip_country_code": {"description": "Code of the country matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "AU",- "IN",- "US"- ],+ "examples": ["AU", "IN", "US"],"label": "Latest country code"},"$geoip_country_confidence": {"description": "Confidence level of the country matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "0.5"- ],+ "examples": ["0.5"],"label": "Latest GeoIP detection country confidence"},"$geoip_country_name": {"description": "Name of the country matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "Australia",- "India",- "United States"- ],+ "examples": ["Australia", "India", "United States"],"label": "Latest country name"},"$geoip_disable": {@@ -6801,64 +5191,39 @@},"$geoip_latitude": {"description": "Approximated latitude matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "-33.8591",- "13.1337",- "40.7"- ],+ "examples": ["-33.8591", "13.1337", "40.7"],"label": "Latest latitude"},"$geoip_longitude": {"description": "Approximated longitude matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "151.2",- "80.8008",- "-73.9"- ],+ "examples": ["151.2", "80.8008", "-73.9"],"label": "Latest longitude"},"$geoip_postal_code": {"description": "Approximated postal code matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "2000",- "600004",- "11211"- ],+ "examples": ["2000", "600004", "11211"],"label": "Latest postal code"},"$geoip_postal_code_confidence": {"description": "If provided by the licensed geoip database Data from the last time this user was seen.",- "examples": [- "null",- "0.1"- ],+ "examples": ["null", "0.1"],"ignored_in_assistant": true,"label": "Latest postal code identification confidence score","system": true},"$geoip_subdivision_1_code": {"description": "Code of the subdivision matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "NSW",- "TN",- "NY"- ],+ "examples": ["NSW", "TN", "NY"],"label": "Latest subdivision 1 code"},"$geoip_subdivision_1_confidence": {"description": "Confidence level of the first subdivision matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "0.5"- ],+ "examples": ["0.5"],"label": "Latest GeoIP detection subdivision 1 confidence"},"$geoip_subdivision_1_name": {"description": "Name of the subdivision matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "New South Wales",- "Tamil Nadu",- "New York"- ],+ "examples": ["New South Wales", "Tamil Nadu", "New York"],"label": "Latest subdivision 1 name"},"$geoip_subdivision_2_code": {@@ -6867,10 +5232,7 @@},"$geoip_subdivision_2_confidence": {"description": "If provided by the licensed geoip database Data from the last time this user was seen.",- "examples": [- "null",- "0.1"- ],+ "examples": ["null", "0.1"],"ignored_in_assistant": true,"label": "Latest subdivision 2 identification confidence score","system": true@@ -6889,18 +5251,12 @@},"$geoip_time_zone": {"description": "Timezone matched to this event's IP address. Data from the last time this user was seen.",- "examples": [- "Australia/Sydney",- "Asia/Kolkata",- "America/New_York"- ],+ "examples": ["Australia/Sydney", "Asia/Kolkata", "America/New_York"],"label": "Latest timezone"},"$go_version": {"description": "The Go version that was used to capture the event.",- "examples": [- "go1.23.0"- ],+ "examples": ["go1.23.0"],"ignored_in_assistant": true,"label": "Go version","system": true@@ -6954,10 +5310,7 @@},"$host": {"description": "The hostname of the Current URL.",- "examples": [- "example.com",- "localhost:8000"- ],+ "examples": ["example.com", "localhost:8000"],"label": "Host"},"$ignore_sent_at": {@@ -6980,9 +5333,7 @@},"$initial_app_namespace": {"description": "The namespace of the app as identified in the app store. Data from the first time this user was seen.",- "examples": [- "com.posthog.app"- ],+ "examples": ["com.posthog.app"],"label": "Initial app namespace"},"$initial_app_version": {@@ -6991,25 +5342,17 @@},"$initial_browser": {"description": "Name of the browser the user has used. Data from the first time this user was seen.",- "examples": [- "Chrome",- "Firefox"- ],+ "examples": ["Chrome", "Firefox"],"label": "Initial browser"},"$initial_browser_version": {"description": "The version of the browser that was used. Used in combination with Browser. Data from the first time this user was seen.",- "examples": [- "70",- "79"- ],+ "examples": ["70", "79"],"label": "Initial browser version"},"$initial_current_url": {"description": "The URL visited at the time of the event. Data from the first time this user was seen.",- "examples": [- "https://example.com/interesting-article?parameter=true"- ],+ "examples": ["https://example.com/interesting-article?parameter=true"],"label": "Initial current URL"},"$initial_dclid": {@@ -7018,11 +5361,7 @@},"$initial_device_type": {"description": "The type of device that was used. Data from the first time this user was seen.",- "examples": [- "Mobile",- "Tablet",- "Desktop"- ],+ "examples": ["Mobile", "Tablet", "Desktop"],"label": "Initial device type"},"$initial_epik": {@@ -7051,68 +5390,42 @@},"$initial_geoip_accuracy_radius": {"description": "Accuracy radius of the location matched to this event's IP address (in kilometers). Data from the first time this user was seen.",- "examples": [- "50"- ],+ "examples": ["50"],"label": "Initial GeoIP detection accuracy radius"},"$initial_geoip_city_confidence": {"description": "Confidence level of the city matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "0.5"- ],+ "examples": ["0.5"],"label": "Initial GeoIP detection city confidence"},"$initial_geoip_city_name": {"description": "Name of the city matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "Sydney",- "Chennai",- "Brooklyn"- ],+ "examples": ["Sydney", "Chennai", "Brooklyn"],"label": "Initial city name"},"$initial_geoip_continent_code": {"description": "Code of the continent matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "OC",- "AS",- "NA"- ],+ "examples": ["OC", "AS", "NA"],"label": "Initial continent code"},"$initial_geoip_continent_name": {"description": "Name of the continent matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "Oceania",- "Asia",- "North America"- ],+ "examples": ["Oceania", "Asia", "North America"],"label": "Initial continent name"},"$initial_geoip_country_code": {"description": "Code of the country matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "AU",- "IN",- "US"- ],+ "examples": ["AU", "IN", "US"],"label": "Initial country code"},"$initial_geoip_country_confidence": {"description": "Confidence level of the country matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "0.5"- ],+ "examples": ["0.5"],"label": "Initial GeoIP detection country confidence"},"$initial_geoip_country_name": {"description": "Name of the country matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "Australia",- "India",- "United States"- ],+ "examples": ["Australia", "India", "United States"],"label": "Initial country name"},"$initial_geoip_disable": {@@ -7121,64 +5434,39 @@},"$initial_geoip_latitude": {"description": "Approximated latitude matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "-33.8591",- "13.1337",- "40.7"- ],+ "examples": ["-33.8591", "13.1337", "40.7"],"label": "Initial latitude"},"$initial_geoip_longitude": {"description": "Approximated longitude matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "151.2",- "80.8008",- "-73.9"- ],+ "examples": ["151.2", "80.8008", "-73.9"],"label": "Initial longitude"},"$initial_geoip_postal_code": {"description": "Approximated postal code matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "2000",- "600004",- "11211"- ],+ "examples": ["2000", "600004", "11211"],"label": "Initial postal code"},"$initial_geoip_postal_code_confidence": {"description": "If provided by the licensed geoip database Data from the first time this user was seen.",- "examples": [- "null",- "0.1"- ],+ "examples": ["null", "0.1"],"ignored_in_assistant": true,"label": "Initial postal code identification confidence score","system": true},"$initial_geoip_subdivision_1_code": {"description": "Code of the subdivision matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "NSW",- "TN",- "NY"- ],+ "examples": ["NSW", "TN", "NY"],"label": "Initial subdivision 1 code"},"$initial_geoip_subdivision_1_confidence": {"description": "Confidence level of the first subdivision matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "0.5"- ],+ "examples": ["0.5"],"label": "Initial GeoIP detection subdivision 1 confidence"},"$initial_geoip_subdivision_1_name": {"description": "Name of the subdivision matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "New South Wales",- "Tamil Nadu",- "New York"- ],+ "examples": ["New South Wales", "Tamil Nadu", "New York"],"label": "Initial subdivision 1 name"},"$initial_geoip_subdivision_2_code": {@@ -7187,10 +5475,7 @@},"$initial_geoip_subdivision_2_confidence": {"description": "If provided by the licensed geoip database Data from the first time this user was seen.",- "examples": [- "null",- "0.1"- ],+ "examples": ["null", "0.1"],"ignored_in_assistant": true,"label": "Initial subdivision 2 identification confidence score","system": true@@ -7209,19 +5494,12 @@},"$initial_geoip_time_zone": {"description": "Timezone matched to this event's IP address. Data from the first time this user was seen.",- "examples": [- "Australia/Sydney",- "Asia/Kolkata",- "America/New_York"- ],+ "examples": ["Australia/Sydney", "Asia/Kolkata", "America/New_York"],"label": "Initial timezone"},"$initial_host": {"description": "Hostname of the URL the user first visited.",- "examples": [- "example.com",- "localhost:8000"- ],+ "examples": ["example.com", "localhost:8000"],"label": "Initial host"},"$initial_igshid": {@@ -7250,33 +5528,22 @@},"$initial_os": {"description": "The operating system of the user. Data from the first time this user was seen.",- "examples": [- "Windows",- "Mac OS X"- ],+ "examples": ["Windows", "Mac OS X"],"label": "Initial OS"},"$initial_os_name": {"description": "The Operating System name. Data from the first time this user was seen.",- "examples": [- "iOS",- "Android"- ],+ "examples": ["iOS", "Android"],"label": "Initial OS name"},"$initial_os_version": {"description": "The Operating System version. Data from the first time this user was seen.",- "examples": [- "15.5"- ],+ "examples": ["15.5"],"label": "Initial OS version"},"$initial_pathname": {"description": "The path of the Current URL, which means everything in the url after the domain. Data from the first time this user was seen.",- "examples": [- "/pricing",- "/about-us/team"- ],+ "examples": ["/pricing", "/about-us/team"],"label": "Initial path name"},"$initial_person_info": {@@ -7290,9 +5557,7 @@},"$initial_raw_user_agent": {"description": "PostHog process information like browser, OS, and device type from the user agent string. This is the raw user agent string. Data from the first time this user was seen.",- "examples": [- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)"- ],+ "examples": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)"],"label": "Initial raw user agent"},"$initial_rdt_cid": {@@ -7301,17 +5566,12 @@},"$initial_referrer": {"description": "URL of where the user came from. Data from the first time this user was seen.",- "examples": [- "https://google.com/search?q=posthog&rlz=1C..."- ],+ "examples": ["https://google.com/search?q=posthog&rlz=1C..."],"label": "Initial referrer URL"},"$initial_referring_domain": {"description": "Domain of where the user came from. Data from the first time this user was seen.",- "examples": [- "google.com",- "facebook.com"- ],+ "examples": ["google.com", "facebook.com"],"label": "Initial referring domain"},"$initial_sccid": {@@ -7320,26 +5580,17 @@},"$initial_screen_height": {"description": "The height of the user's entire screen (in pixels). Data from the first time this user was seen.",- "examples": [- "2160",- "1050"- ],+ "examples": ["2160", "1050"],"label": "Initial screen height"},"$initial_screen_width": {"description": "The width of the user's entire screen (in pixels). Data from the first time this user was seen.",- "examples": [- "1440",- "1920"- ],+ "examples": ["1440", "1920"],"label": "Initial screen width"},"$initial_search_engine": {"description": "Search engine the user came from on their first visit, if any.",- "examples": [- "Google",- "DuckDuckGo"- ],+ "examples": ["Google", "DuckDuckGo"],"label": "Initial search engine"},"$initial_ttclid": {@@ -7352,61 +5603,37 @@},"$initial_utm_campaign": {"description": "UTM campaign tag. Data from the first time this user was seen.",- "examples": [- "feature launch",- "discount"- ],+ "examples": ["feature launch", "discount"],"label": "Initial UTM campaign"},"$initial_utm_content": {"description": "UTM content tag. Data from the first time this user was seen.",- "examples": [- "bottom link",- "second button"- ],+ "examples": ["bottom link", "second button"],"label": "Initial UTM content"},"$initial_utm_medium": {"description": "UTM medium tag. Data from the first time this user was seen.",- "examples": [- "Social",- "Organic",- "Paid",- "Email"- ],+ "examples": ["Social", "Organic", "Paid", "Email"],"label": "Initial UTM medium"},"$initial_utm_source": {"description": "UTM source tag.",- "examples": [- "Google",- "Bing",- "Twitter",- "Facebook"- ],+ "examples": ["Google", "Bing", "Twitter", "Facebook"],"label": "Initial UTM source"},"$initial_utm_term": {"description": "UTM term tag. Data from the first time this user was seen.",- "examples": [- "free goodies"- ],+ "examples": ["free goodies"],"label": "Initial UTM term"},"$initial_viewport_height": {"description": "The height of the user's actual browser window (in pixels). Data from the first time this user was seen.",- "examples": [- "2094",- "1031"- ],+ "examples": ["2094", "1031"],"label": "Initial viewport height"},"$initial_viewport_width": {"description": "The width of the user's actual browser window (in pixels). Data from the first time this user was seen.",- "examples": [- "1439",- "1915"- ],+ "examples": ["1439", "1915"],"label": "Initial viewport width"},"$initial_wbraid": {@@ -7415,19 +5642,12 @@},"$initial_webview_app": {"description": "Name of the host app whose in-app browser the event came from, such as an event opened inside the LinkedIn or Instagram app. Set from the user agent when the SDK can identify the host app. Data from the first time this user was seen.",- "examples": [- "LinkedIn",- "Instagram",- "TikTok"- ],+ "examples": ["LinkedIn", "Instagram", "TikTok"],"label": "Initial in-app browser"},"$initial_webview_app_version": {"description": "Version of the host app whose in-app browser the event came from. Data from the first time this user was seen.",- "examples": [- "309.1.0",- "375.0.0"- ],+ "examples": ["309.1.0", "375.0.0"],"label": "Initial in-app browser version"},"$initialization_time": {@@ -7443,24 +5663,17 @@},"$ip": {"description": "IP address for this user when the event was sent.",- "examples": [- "203.0.113.0"- ],+ "examples": ["203.0.113.0"],"label": "IP address"},"$ip_address": {"description": "The IP address of the client that sent this event. Used by server-side SDKs.",- "examples": [- "203.0.113.0"- ],+ "examples": ["203.0.113.0"],"label": "IP address"},"$is_emulator": {"description": "Indicates whether the app is running on an emulator or a physical device",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Is emulator"},"$is_identified": {@@ -7469,18 +5682,12 @@},"$is_ios_running_on_mac": {"description": "Indicates whether the app is an iOS app running on macOS (Apple Silicon)",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Is iOS app running on Mac"},"$is_mac_catalyst_app": {"description": "Indicates whether the app is a Mac Catalyst app running on macOS",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Is Mac Catalyst app"},"$issue_description": {@@ -7495,12 +5702,7 @@},"$issue_severity": {"description": "The severity assigned when this exception creates an error tracking issue.",- "examples": [- "low",- "medium",- "high",- "critical"- ],+ "examples": ["low", "medium", "high", "critical"],"label": "Issue severity","type": "String"},@@ -7518,116 +5720,76 @@},"$level": {"description": "The severity level of the exception or log.",- "examples": [- "error",- "warning",- "info",- "fatal"- ],+ "examples": ["error", "warning", "info", "fatal"],"label": "Severity level","type": "String"},"$lib": {"description": "What library was used to send the event.",- "examples": [- "web",- "posthog-ios"- ],+ "examples": ["web", "posthog-ios"],"label": "Library"},"$lib_custom_api_host": {"description": "The custom API host used to send the event.",- "examples": [- "https://ph.example.com"- ],+ "examples": ["https://ph.example.com"],"label": "Library custom API host"},"$lib_rate_limit_remaining_tokens": {"description": "Remaining rate limit tokens for the posthog-js library client-side rate limiting implementation.",- "examples": [- "100"- ],+ "examples": ["100"],"ignored_in_assistant": true,"label": "Clientside rate limit remaining tokens","used_for_debug": true},"$lib_version": {"description": "Version of the library used to send the event. Used in combination with Library.",- "examples": [- "1.0.3"- ],+ "examples": ["1.0.3"],"label": "Library version"},"$lib_version__major": {"description": "Major version of the library used to send the event.",- "examples": [- 1- ],+ "examples": [1],"label": "Library version (major)"},"$lib_version__minor": {"description": "Minor version of the library used to send the event.",- "examples": [- 0- ],+ "examples": [0],"label": "Library version (minor)"},"$lib_version__patch": {"description": "Patch version of the library used to send the event.",- "examples": [- 3- ],+ "examples": [3],"label": "Library version (patch)"},"$locale": {"description": "The locale of the device",- "examples": [- "en-US",- "de-DE"- ],+ "examples": ["en-US", "de-DE"],"label": "Locale"},"$mcp_auth_failure_reason": {"description": "Why an MCP request was refused, on $mcp_auth_failed: insufficient_scope (the credential is valid but the API denied the call), inactive_oauth_token, invalid_api_key, or unknown. insufficient_scope also carries $mcp_missing_scope when the API named a scope.",- "examples": [- "insufficient_scope",- "invalid_api_key",- "inactive_oauth_token"- ],+ "examples": ["insufficient_scope", "invalid_api_key", "inactive_oauth_token"],"label": "MCP auth failure reason"},"$mcp_auth_method": {"description": "Which credential the MCP request authenticated with, derived from the bearer token's prefix: oauth, personal_api_key, id_jag, none, or unknown. Stamped on every event by PostHog's own MCP server. Use it to tell an OAuth connector apart from an API-key connection \u2014 for example when a user works around a broken OAuth flow by switching to a personal API key.",- "examples": [- "oauth",- "personal_api_key"- ],+ "examples": ["oauth", "personal_api_key"],"label": "MCP auth method"},"$mcp_auth_status": {"description": "HTTP status returned to the client when an MCP request was refused (401 for a rejected credential, 403 for a denied scope). Distinct from $mcp_error_status, which is the upstream status of a failed tool call. Only set on $mcp_auth_failed.",- "examples": [- 401,- 403- ],+ "examples": [401, 403],"label": "MCP auth status","type": "Numeric"},"$mcp_client_name": {"description": "The MCP client that initiated the connection. Common values are coding agents (Claude Code, Codex) and chat clients (Claude desktop, Claude on web).",- "examples": [- "claude-code",- "codex-mcp-client",- "Anthropic/ClaudeAI"- ],+ "examples": ["claude-code", "codex-mcp-client", "Anthropic/ClaudeAI"],"label": "MCP client name"},"$mcp_client_user_agent": {"description": "Full User-Agent string the MCP client sent on the transport. Often includes the agent name, version, and runtime mode \u2014 useful when $mcp_client_name and $mcp_client_version alone don't disambiguate the caller.",- "examples": [- "claude-code/2.1.141 (cli)",- "Anthropic/ClaudeAI"- ],+ "examples": ["claude-code/2.1.141 (cli)", "Anthropic/ClaudeAI"],"label": "MCP client user agent"},"$mcp_client_version": {@@ -7636,10 +5798,7 @@},"$mcp_consumer": {"description": "The upstream surface that initiated the MCP request, supplied via the `x-posthog-mcp-consumer` header. 'posthog-code' is the catch-all every sandbox agent sends, so it covers Signals runs as well as PostHog Desktop; break down by `source` to separate them. 'slack' means it was triggered from Slack.",- "examples": [- "posthog-code",- "slack"- ],+ "examples": ["posthog-code", "slack"],"label": "MCP consumer"},"$mcp_conversation_id": {@@ -7648,29 +5807,18 @@},"$mcp_duration_ms": {"description": "Wall-clock duration of the MCP tool or resource call, in milliseconds.",- "examples": [- 42,- 1280- ],+ "examples": [42, 1280],"label": "MCP duration (ms)","type": "Numeric"},"$mcp_error_code": {"description": "Machine-readable code for the leaf failure mode of an errored MCP tool call: the API's validation error code, or the exec dispatcher's rejection reason. Carries error codes only, never caller-supplied values. Only set when $mcp_is_error is true.",- "examples": [- "invalid",- "required",- "unknown_tool",- "invalid_json"- ],+ "examples": ["invalid", "required", "unknown_tool", "invalid_json"],"label": "MCP error code"},"$mcp_error_field": {"description": "Field path the PostHog API's validation error pointed at, with array indexes normalized to N so one failure mode groups to one value. Only set for validation failures.",- "examples": [- "actions__N__inputs__email",- "query"- ],+ "examples": ["actions__N__inputs__email", "query"],"label": "MCP error field"},"$mcp_error_message": {@@ -7679,80 +5827,48 @@},"$mcp_error_status": {"description": "Upstream HTTP status code when an MCP tool call failed against a PostHog API (e.g. 429, 500). Only set for API-originated failures.",- "examples": [- 429,- 500,- 403- ],+ "examples": [429, 500, 403],"label": "MCP error status","type": "Numeric"},"$mcp_error_type": {"description": "Failure category for an errored MCP tool call, for breaking failures down by reason. PostHog's server emits a semantic bucket (missing_context, validation, permission, timeout, rate_limited, api_4xx, api_5xx, internal); external servers using the SDK fall back to the thrown error's type. Only set when $mcp_is_error is true.",- "examples": [- "rate_limited",- "validation",- "timeout",- "api_4xx"- ],+ "examples": ["rate_limited", "validation", "timeout", "api_4xx"],"label": "MCP error type"},"$mcp_exec_inner_tool_names": {"description": "Array of every inner tool name available to the agent at the time of a tools/list request. Stored as a JSON array \u2014 filter with `contains` against a single tool name (e.g. 'execute-sql'). Only stamped on mcp_tools_list events when running in single-exec mode (in multi-tool mode the SDK's $mcp_listed_tool_names already carries the catalog). Lets you compute zombie tools by diffing against $mcp_exec_tool_call_name from mcp_tool_call events.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP exec inner tool catalog"},"$mcp_exec_target_tool": {"description": "The tool an exec info, schema, or call verb named, when it resolves to a tool in the server's catalog; `unrecognized` otherwise so the caller's own token is never recorded. Links an `info` read to the `call` that follows it.",- "examples": [- "experiment-get",- "unrecognized"- ],+ "examples": ["experiment-get", "unrecognized"],"label": "MCP exec target tool"},"$mcp_exec_tool_call_description": {"description": "In single-exec mode, $mcp_tool_name is always 'exec' (the dispatcher), so the SDK's $mcp_tool_description is the dispatcher's static text on every call. This property carries the description of the inner tool the agent was actually invoking via 'call <tool> ...' \u2014 derived server-side by parsing the exec command and looking the inner tool up in our catalog. Only present when an exec call targets a recognized inner tool.",- "examples": [- "Run a HogQL/SQL query against PostHog.",- "List feature flags in the project."- ],+ "examples": ["Run a HogQL/SQL query against PostHog.", "List feature flags in the project."],"label": "MCP exec inner tool description"},"$mcp_exec_tool_call_name": {"description": "In single-exec mode, $mcp_tool_name is always 'exec' (the dispatcher), so by itself it doesn't tell you which inner tool the agent was actually invoking. This property carries the inner tool's name \u2014 derived server-side by parsing the exec command's `call <tool> ...` form and looking it up in our catalog. Use it for breakdowns / funnels that should pivot on the real tool rather than the dispatcher. Only present when an exec call targets a recognized inner tool.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP exec inner tool name"},"$mcp_exec_verb": {"description": "Which exec dispatcher verb the request ran: tools, search, info, schema, call, learn, or `unrecognized` for a verb the server does not accept. Only set in exec mode ($mcp_mode).",- "examples": [- "call",- "info",- "unrecognized"- ],+ "examples": ["call", "info", "unrecognized"],"label": "MCP exec verb"},"$mcp_input_aliases_used": {"description": "Declared parameter aliases the call relied on, as `alias:canonical` (for example `experimentId:id`). Present only when the call did not send the canonical name and used one of its aliases instead. Both names come from the tool's own alias map. Recorded by the @posthog/mcp SDK helper. Measures how much traffic the alias layer rescues, and which spellings agents reach for.",- "examples": [- "experimentId:id",- "flagKey:key"- ],+ "examples": ["experimentId:id", "flagKey:key"],"label": "MCP input aliases used"},"$mcp_input_keys": {"description": "Top-level argument names the caller sent on a tool call, success or failure: every direct-mode call, `render-ui`, and an exec `call` (parsed from the command string). Exec discovery verbs (tools, search, info, schema) carry none, so rate against rows where it is set rather than every $mcp_tool_call. Recorded by the @posthog/mcp SDK helper: names the tool declares, including its aliases, capped at 20. Undeclared names become one `[redacted]` entry. Names only, never values. Group by it with $mcp_input_aliases_used to see how agents spell a parameter.",- "examples": [- "id",- "experimentId",- "filters, key, name"- ],+ "examples": ["id", "experimentId", "filters, key, name"],"label": "MCP input keys"},"$mcp_intent": {@@ -7765,10 +5881,7 @@},"$mcp_intent_source": {"description": "Where $mcp_intent came from. 'context_parameter' means the client supplied it directly on the call; 'inferred' means the MCP server derived it via its intentFallback.",- "examples": [- "context_parameter",- "inferred"- ],+ "examples": ["context_parameter", "inferred"],"label": "MCP intent source"},"$mcp_is_error": {@@ -7777,53 +5890,32 @@},"$mcp_listed_tool_names": {"description": "Array of every tool name advertised to the agent on a tools/list request, in multi-tool mode. Stored as a JSON array \u2014 filter with `contains` against a single tool name (e.g. 'execute-sql'). Lets you compute zombie tools (advertised but never called) by diffing against $mcp_tool_name from mcp_tool_call events. In single-exec mode the catalog rides on $mcp_exec_inner_tool_names instead. Only present on mcp_tools_list.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP listed tool names"},"$mcp_llm_model": {"description": "The model used by the MCP client for this tool call. Taken from recognized client metadata when available, otherwise from the agent's self-reported llm_model argument. MCP does not attest model identity, so use this for analytics rather than billing or access control.",- "examples": [- "claude-sonnet-5",- "gpt-5.6-sol"- ],+ "examples": ["claude-sonnet-5", "gpt-5.6-sol"],"label": "MCP model"},"$mcp_llm_model_missing_reason": {"description": "Why PostHog's MCP server captured no model identifier. missing means llm_model was omitted; unknown means the agent explicitly reported unknown; invalid means the argument was blank or not a string; not_captured means a nonempty report was not captured by the analytics SDK; capture_error means analytics preparation failed. Only set when no model was captured. Older events and other MCP servers may omit this property.",- "examples": [- "missing",- "unknown",- "invalid",- "not_captured",- "capture_error"- ],+ "examples": ["missing", "unknown", "invalid", "not_captured", "capture_error"],"label": "MCP model missing reason"},"$mcp_llm_model_source": {"description": "How the model identifier was obtained. client_metadata means the MCP client supplied recognized metadata. self_reported means the agent filled the injected llm_model argument. Both sources are unverified.",- "examples": [- "client_metadata",- "self_reported"- ],+ "examples": ["client_metadata", "self_reported"],"label": "MCP model source"},"$mcp_missing_scope": {"description": "The API scope the PostHog API said was missing when it refused an MCP request. Only set on $mcp_auth_failed with reason insufficient_scope, and only when the API named a specific scope.",- "examples": [- "insight:read",- "query:read"- ],+ "examples": ["insight:read", "query:read"],"label": "MCP missing scope"},"$mcp_mode": {"description": "Which tool-registration mode the MCP server ran in for this request. 'cli' is single-exec mode (the v2 wrapper that exposes one dispatcher tool taking a `call <tool> ...` command); 'tools' exposes every tool individually.",- "examples": [- "cli",- "tools"- ],+ "examples": ["cli", "tools"],"label": "MCP mode"},"$mcp_oauth_client_name": {@@ -7852,11 +5944,7 @@},"$mcp_protocol_version": {"description": "The MCP protocol revision the request was made under, such as 2025-11-25 or 2026-07-28.",- "examples": [- "2025-11-25",- "2025-06-18",- "2026-07-28"- ],+ "examples": ["2025-11-25", "2025-06-18", "2026-07-28"],"label": "MCP protocol version"},"$mcp_read_only": {@@ -7865,10 +5953,7 @@},"$mcp_region": {"description": "The PostHog cloud region the MCP server routed the request to.",- "examples": [- "us",- "eu"- ],+ "examples": ["us", "eu"],"label": "MCP region"},"$mcp_resource_name": {@@ -7881,27 +5966,17 @@},"$mcp_scope_preset": {"description": "Which kind of caller minted the token behind an MCP request, worked out from its scope set. 'scout' is a Signals scout run, 'research' is a read-only report-research run, 'implementation' is a write-capable implementation run, 'sandbox' is any other server-minted run (a task started from the desktop app or the pipeline before the scratchpad scopes tell research and implementation apart), and 'user' is a person's own token. Stamped on every event by PostHog's own MCP server. Use it to split scratchpad and notes usage by caller, for example to measure scout scratchpad adoption apart from ordinary users.",- "examples": [- "scout",- "research",- "implementation",- "sandbox",- "user"- ],+ "examples": ["scout", "research", "implementation", "sandbox", "user"],"label": "MCP scope preset"},"$mcp_server_build": {"description": "The exact immutable build identifier that the MCP host supplies, such as a Git commit SHA or container image digest. Use it to connect an event to deployed code when one server version has multiple builds.",- "examples": [- "b3b941584bae0123"- ],+ "examples": ["b3b941584bae0123"],"label": "MCP server build"},"$mcp_server_name": {"description": "The advertised name of the MCP server that handled the request.",- "examples": [- "PostHog"- ],+ "examples": ["PostHog"],"label": "MCP server name"},"$mcp_server_version": {@@ -7914,35 +5989,22 @@},"$mcp_skill_body_offset": {"description": "Where in a skill's body a `skill-get` started reading. Long bodies come back in slices, so one skill load is several calls that differ only by this offset, and a first read usually omits the offset \u2014 absent and 0 both mean a first page. Scope the query to `$mcp_tool_name IN ('skill-get', 'llma-skill-get')` before counting: the property is never set on `skill-file-get` or on a failed read, so an absent value outside that scope means 'never paginated' rather than 'first page', and counting it inflates loads. Within the scope, count calls where the offset is absent or 0 for loads, and every call for pages read. Set only on reads that succeeded, like `$mcp_skill_name`.",- "examples": [- "0",- "5000"- ],+ "examples": ["0", "5000"],"label": "MCP skill body offset"},"$mcp_skill_name": {"description": "The stored skill a skill-* read tool returned, on `skill-get` and `skill-file-get` (and their `llma-skill-*` aliases). Present only when the read succeeded, so counting these events counts skills that were actually delivered. A failed read carries no skill name, which stops a deleted skill that agents keep requesting from reading as a popular one. Recorded only when the value matches the shape the skills store enforces at creation, so a name the agent invented is left off rather than echoed. Skill writes are not stamped here; those emit `llma skill *` from the skills API.",- "examples": [- "prove-the-change",- "pr-shepherd"- ],+ "examples": ["prove-the-change", "pr-shepherd"],"label": "MCP skill name"},"$mcp_source": {"description": "Constant identifier for the analytics SDK that emitted the event. Lets you separate events from different SDK versions or unrelated MCP servers.",- "examples": [- "posthog_mcp_analytics"- ],+ "examples": ["posthog_mcp_analytics"],"label": "MCP source"},"$mcp_tool_category": {"description": "The product category the invoked tool belongs to \u2014 the grouping dimension the MCP analytics dashboard buckets tool calls by. Stamped server-side from the tool catalog (PostHog's server) or declared per tool (external servers). Omitted when the tool has no catalogued category (e.g. the `exec` dispatcher), which the dashboard buckets as 'Uncategorized'. Present on mcp_tool_call.",- "examples": [- "Error tracking",- "Logs",- "Feature flags",- "Session replays"- ],+ "examples": ["Error tracking", "Logs", "Feature flags", "Session replays"],"label": "MCP tool category"},"$mcp_tool_description": {@@ -7955,109 +6017,68 @@},"$mcp_tool_name": {"description": "The name of the MCP tool that was invoked. Only present on mcp_tool_call.",- "examples": [- "execute-sql",- "feature-flag-get-all"- ],+ "examples": ["execute-sql", "feature-flag-get-all"],"label": "MCP tool name"},"$mcp_transport": {"description": "The transport the MCP client used to connect to the server.",- "examples": [- "stdio",- "sse",- "streamable-http"- ],+ "examples": ["stdio", "sse", "streamable-http"],"label": "MCP transport"},"$mcp_validation_fields": {"description": "Parameter paths the MCP server's own input schema rejected, as `path:code` (for example `id:invalid_type`). Names from the tool's schema, never caller values. Only set when the server rejected the input before calling PostHog.",- "examples": [- "id:invalid_type",- "filters.groups:required"- ],+ "examples": ["id:invalid_type", "filters.groups:required"],"label": "MCP validation fields"},"$mcp_vendor_client": {"description": "Vendor client header the MCP client sent on the transport (x-anthropic-client), captured raw. The strongest harness signal: clientInfo.name can't tell one vendor surface from another, but this header can.",- "examples": [- "ClaudeCode",- "ClaudeAI",- "Cowork"- ],+ "examples": ["ClaudeCode", "ClaudeAI", "Cowork"],"label": "MCP vendor client"},"$mcp_version": {"description": "Server-resolved MCP version. May differ from the version the client reported because of the mcp-version-2 feature flag.",- "examples": [- 1,- 2- ],+ "examples": [1, 2],"label": "MCP server version (internal)","type": "Numeric"},"$network_bluetooth": {"description": "Whether the user was on Bluetooth when the event was sent.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Network Bluetooth"},"$network_carrier": {"description": "The network carrier that the user is on.",- "examples": [- "cricket",- "telecom"- ],+ "examples": ["cricket", "telecom"],"label": "Network carrier"},"$network_cellular": {"description": "Whether the user was on cellular when the event was sent.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Network Cellular"},"$network_wifi": {"description": "Whether the user was on WiFi when the event was sent.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "Network WiFi"},"$os": {"description": "The operating system of the user. Data from the last time this user was seen.",- "examples": [- "Windows",- "Mac OS X"- ],+ "examples": ["Windows", "Mac OS X"],"label": "Latest OS"},"$os_distro": {"description": "The distribution name in case of Linux.",- "examples": [- "Ubuntu",- "Debian",- "Fedora"- ],+ "examples": ["Ubuntu", "Debian", "Fedora"],"label": "OS distro"},"$os_name": {"description": "The Operating System name. Data from the last time this user was seen.",- "examples": [- "iOS",- "Android"- ],+ "examples": ["iOS", "Android"],"label": "Latest OS name"},"$os_version": {"description": "The Operating System version. Data from the last time this user was seen.",- "examples": [- "15.5"- ],+ "examples": ["15.5"],"label": "Latest OS version"},"$otel_end_time_unix_nano": {@@ -8096,10 +6117,7 @@},"$pathname": {"description": "The path of the Current URL, which means everything in the url after the domain. Data from the last time this user was seen.",- "examples": [- "/pricing",- "/about-us/team"- ],+ "examples": ["/pricing", "/about-us/team"],"label": "Latest path name"},"$performance_page_loaded": {@@ -8125,81 +6143,58 @@},"$prev_pageview_duration": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview duration"},"$prev_pageview_id": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- "1"- ],+ "examples": ["1"],"label": "Previous pageview ID","system": true},"$prev_pageview_last_content": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview last content"},"$prev_pageview_last_content_percentage": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview last content percentage"},"$prev_pageview_last_scroll": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview last scroll"},"$prev_pageview_last_scroll_percentage": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview last scroll percentage"},"$prev_pageview_max_content": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview max content"},"$prev_pageview_max_content_percentage": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview max content percentage"},"$prev_pageview_max_scroll": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview max scroll"},"$prev_pageview_max_scroll_percentage": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- 0- ],+ "examples": [0],"label": "Previous pageview max scroll percentage"},"$prev_pageview_pathname": {"description": "posthog-js adds these to the page leave event, they are used in web analytics calculations",- "examples": [- "/pricing",- "/about-us/team"- ],+ "examples": ["/pricing", "/about-us/team"],"label": "Previous pageview pathname"},"$process_person": {@@ -8234,19 +6229,13 @@},"$product_tour_step_order": {"description": "The zero-based order of the product tour step the event relates to.",- "examples": [- 0,- 1,- 2- ],+ "examples": [0, 1, 2],"label": "Product tour step order","type": "Numeric"},"$product_tour_steps_count": {"description": "The total number of steps in the product tour.",- "examples": [- 5- ],+ "examples": [5],"label": "Product tour steps count","type": "Numeric"},@@ -8263,27 +6252,21 @@},"$python_runtime": {"description": "The Python runtime that was used to capture the event.",- "examples": [- "CPython"- ],+ "examples": ["CPython"],"ignored_in_assistant": true,"label": "Python runtime","system": true},"$python_version": {"description": "The Python version that was used to capture the event.",- "examples": [- "3.11.5"- ],+ "examples": ["3.11.5"],"ignored_in_assistant": true,"label": "Python version","system": true},"$raw_user_agent": {"description": "PostHog process information like browser, OS, and device type from the user agent string. This is the raw user agent string. Data from the last time this user was seen.",- "examples": [- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)"- ],+ "examples": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)"],"label": "Latest raw user agent"},"$recording_status": {@@ -8294,24 +6277,17 @@},"$referrer": {"description": "URL of where the user came from. Data from the last time this user was seen.",- "examples": [- "https://google.com/search?q=posthog&rlz=1C..."- ],+ "examples": ["https://google.com/search?q=posthog&rlz=1C..."],"label": "Latest referrer URL"},"$referring_domain": {"description": "Domain of where the user came from. Data from the last time this user was seen.",- "examples": [- "google.com",- "facebook.com"- ],+ "examples": ["google.com", "facebook.com"],"label": "Latest referring domain"},"$replay_minimum_duration": {"description": "Config for minimum duration before emitting a session recording.",- "examples": [- "1000"- ],+ "examples": ["1000"],"label": "Replay config - minimum duration","system": true,"used_for_debug": true@@ -8342,43 +6318,32 @@},"$replay_sample_rate": {"description": "Config for sampling rate of session recordings.",- "examples": [- "0.1"- ],+ "examples": ["0.1"],"label": "Replay config - sample rate","system": true,"used_for_debug": true},"$replay_script_config": {"description": "Sets an alternative recorder script for the web sdk.",- "examples": [- "{\"script\": \"recorder-next\"}"- ],+ "examples": ["{\"script\": \"recorder-next\"}"],"label": "Replay script config","system": true,"used_for_debug": true},"$revenue": {"description": "The revenue associated with an event, in your account's base currency.",- "examples": [- 9.99- ],+ "examples": [9.99],"label": "Revenue","type": "Numeric"},"$screen_density": {"description": "The logical density of the display. This is a scaling factor for the Density Independent Pixel unit, where one DIP is one pixel on an approximately 160 dpi screen (for example a 240x320, 1.5\"x2\" screen), providing the baseline of the system's display. Thus on a 160dpi screen this density value will be 1; on a 120 dpi screen it would be .75; etc.",- "examples": [- 2.75- ],+ "examples": [2.75],"label": "Screen density"},"$screen_height": {"description": "The height of the user's entire screen (in pixels). Data from the last time this user was seen.",- "examples": [- "2160",- "1050"- ],+ "examples": ["2160", "1050"],"label": "Latest screen height"},"$screen_name": {@@ -8387,10 +6352,7 @@},"$screen_width": {"description": "The width of the user's entire screen (in pixels). Data from the last time this user was seen.",- "examples": [- "1440",- "1920"- ],+ "examples": ["1440", "1920"],"label": "Latest screen width"},"$sdk_debug_current_session_duration": {@@ -8407,28 +6369,21 @@},"$sdk_debug_extensions_init_method": {"description": "The method used to initialize PostHog.js extensions.",- "examples": [- "deferred",- "synchronous"- ],+ "examples": ["deferred", "synchronous"],"label": "PostHog.js extensions init method","type": "String","used_for_debug": true},"$sdk_debug_extensions_init_time_ms": {"description": "The time taken to initialize PostHog.js extensions in milliseconds.",- "examples": [- 150- ],+ "examples": [150],"label": "PostHog.js extensions init time (ms)","type": "Numeric","used_for_debug": true},"$sdk_debug_pending_queue_size": {"description": "Useful for debugging. The depth of the mobile SDK's single disk-backed event queue, which handles both normal batching and retry backoff. Mobile SDKs report this instead of the retry queue size.",- "examples": [- "100"- ],+ "examples": ["100"],"ignored_in_assistant": true,"label": "Pending queue size","system": true,@@ -8441,21 +6396,14 @@},"$sdk_debug_replay_capture_mode": {"description": "How the mobile SDK captures the screen for session replay.",- "examples": [- "screenshot",- "wireframe"- ],+ "examples": ["screenshot", "wireframe"],"label": "Replay capture mode","type": "String","used_for_debug": true},"$sdk_debug_replay_event_trigger_status": {"description": "The status of the recording event trigger.",- "examples": [- "trigger_disabled",- "trigger_pending",- "trigger_matched"- ],+ "examples": ["trigger_disabled", "trigger_pending", "trigger_matched"],"label": "event trigger status","type": "String","used_for_debug": true@@ -8485,9 +6433,7 @@},"$sdk_debug_replay_internal_buffer_length": {"description": "Useful for debugging. The internal buffer length for replay.",- "examples": [- "100"- ],+ "examples": ["100"],"ignored_in_assistant": true,"label": "Replay internal buffer length","system": true,@@ -8495,9 +6441,7 @@},"$sdk_debug_replay_internal_buffer_size": {"description": "Useful for debugging. The internal buffer size for replay.",- "examples": [- "100"- ],+ "examples": ["100"],"ignored_in_assistant": true,"label": "Replay internal buffer size","system": true,@@ -8505,11 +6449,7 @@},"$sdk_debug_replay_linked_flag_trigger_status": {"description": "The status of the linked flag trigger.",- "examples": [- "trigger_disabled",- "trigger_pending",- "trigger_matched"- ],+ "examples": ["trigger_disabled", "trigger_pending", "trigger_matched"],"label": "linked flag trigger status","type": "String","used_for_debug": true@@ -8526,10 +6466,7 @@},"$sdk_debug_replay_remote_trigger_matching_config": {"description": "Whether to match on all or any triggers.",- "examples": [- "all",- "any"- ],+ "examples": ["all", "any"],"label": "remote trigger matching config","type": "String","used_for_debug": true@@ -8541,38 +6478,28 @@},"$sdk_debug_replay_throttle_delay_ms": {"description": "The configured session replay throttle delay in milliseconds on mobile SDKs.",- "examples": [- 1000- ],+ "examples": [1000],"label": "Replay throttle delay (ms)","type": "Numeric","used_for_debug": true},"$sdk_debug_replay_trigger_groups_count": {"description": "The number of V2 recording trigger groups configured for this project.",- "examples": [- 2- ],+ "examples": [2],"label": "Recording trigger groups count","type": "Numeric","used_for_debug": true},"$sdk_debug_replay_url_trigger_status": {"description": "The status of the recording url trigger.",- "examples": [- "trigger_disabled",- "trigger_pending",- "trigger_matched"- ],+ "examples": ["trigger_disabled", "trigger_pending", "trigger_matched"],"label": "URL trigger status","type": "String","used_for_debug": true},"$sdk_debug_retry_queue_size": {"description": "Useful for debugging. The size of the retry queue.",- "examples": [- "100"- ],+ "examples": ["100"],"ignored_in_assistant": true,"label": "Retry queue size","system": true,@@ -8598,10 +6525,7 @@},"$search_engine": {"description": "The search engine the user came in from (if any).",- "examples": [- "Google",- "DuckDuckGo"- ],+ "examples": ["Google", "DuckDuckGo"],"label": "Search engine"},"$selected_content": {@@ -8611,24 +6535,18 @@},"$sent_at": {"description": "Time the event was sent to PostHog. Used for correcting the event timestamp when the device clock is off.",- "examples": [- "2023-05-20T15:31:00Z"- ],+ "examples": ["2023-05-20T15:31:00Z"],"label": "Sent at"},"$sentry_event_id": {"description": "This is the Sentry key for an event.",- "examples": [- "byroc2ar9ee4ijqp"- ],+ "examples": ["byroc2ar9ee4ijqp"],"label": "Sentry event ID","system": true},"$sentry_url": {"description": "Direct link to the exception in Sentry",- "examples": [- "https://sentry.io/..."- ],+ "examples": ["https://sentry.io/..."],"label": "Sentry URL"},"$sess_rec_flush_size": {@@ -8679,10 +6597,7 @@},"$session_entry_host": {"description": "The hostname of the Current URL. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "example.com",- "localhost:8000"- ],+ "examples": ["example.com", "localhost:8000"],"ignored_in_assistant": true,"label": "Session entry Host"},@@ -8713,10 +6628,7 @@},"$session_entry_pathname": {"description": "The path of the Current URL, which means everything in the url after the domain. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "/pricing",- "/about-us/team"- ],+ "examples": ["/pricing", "/about-us/team"],"ignored_in_assistant": true,"label": "Session entry Path name"},@@ -8737,18 +6649,13 @@},"$session_entry_referrer": {"description": "URL of where the user came from. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "https://google.com/search?q=posthog&rlz=1C..."- ],+ "examples": ["https://google.com/search?q=posthog&rlz=1C..."],"ignored_in_assistant": true,"label": "Session entry Referrer URL"},"$session_entry_referring_domain": {"description": "Domain of where the user came from. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "google.com",- "facebook.com"- ],+ "examples": ["google.com", "facebook.com"],"ignored_in_assistant": true,"label": "Session entry Referring domain"},@@ -8769,57 +6676,37 @@},"$session_entry_url": {"description": "The URL visited at the time of the event. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "https://example.com/interesting-article?parameter=true"- ],+ "examples": ["https://example.com/interesting-article?parameter=true"],"ignored_in_assistant": true,"label": "Session entry Current URL"},"$session_entry_utm_campaign": {"description": "UTM campaign tag. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "feature launch",- "discount"- ],+ "examples": ["feature launch", "discount"],"ignored_in_assistant": true,"label": "Session entry UTM campaign"},"$session_entry_utm_content": {"description": "UTM content tag. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "bottom link",- "second button"- ],+ "examples": ["bottom link", "second button"],"ignored_in_assistant": true,"label": "Session entry UTM content"},"$session_entry_utm_medium": {"description": "UTM medium tag. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "Social",- "Organic",- "Paid",- "Email"- ],+ "examples": ["Social", "Organic", "Paid", "Email"],"ignored_in_assistant": true,"label": "Session entry UTM medium"},"$session_entry_utm_source": {"description": "UTM source tag. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "Google",- "Bing",- "Twitter",- "Facebook"- ],+ "examples": ["Google", "Bing", "Twitter", "Facebook"],"ignored_in_assistant": true,"label": "Session entry UTM source"},"$session_entry_utm_term": {"description": "UTM term tag. Captured at the start of the session and remains constant for the duration of the session.",- "examples": [- "free goodies"- ],+ "examples": ["free goodies"],"ignored_in_assistant": true,"label": "Session entry UTM term"},@@ -8835,10 +6722,7 @@},"$session_is_sampled": {"description": "Whether the session is sampled for session recording.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"ignored_in_assistant": true,"label": "Whether the session is sampled","system": true,@@ -8846,9 +6730,7 @@},"$session_recording_canvas_recording": {"description": "Session recording canvas capture config.",- "examples": [- "{\"enabled\": false}"- ],+ "examples": ["{\"enabled\": false}"],"label": "Session recording canvas recording","system": true,"used_for_debug": true@@ -8867,18 +6749,14 @@},"$session_recording_network_payload_capture": {"description": "Session recording network payload capture config.",- "examples": [- "{\"recordHeaders\": false}"- ],+ "examples": ["{\"recordHeaders\": false}"],"label": "Session recording network payload capture","system": true,"used_for_debug": true},"$session_recording_recorder_version_server_side": {"description": "The version of the session recording recorder that is enabled server-side.",- "examples": [- "v2"- ],+ "examples": ["v2"],"ignored_in_assistant": true,"label": "Session recording recorder version server-side","system": true,@@ -8891,11 +6769,7 @@},"$session_recording_start_reason": {"description": "Reason for starting the session recording. Useful for e.g. if you have sampling enabled and want to see on batch exported events which sessions have recordings available.",- "examples": [- "sampling_override",- "recording_initialized",- "linked_flag_match"- ],+ "examples": ["sampling_override", "recording_initialized", "linked_flag_match"],"label": "Session recording start reason","system": true,"used_for_debug": true@@ -8942,10 +6816,7 @@},"$snapshot_source": {"description": "The platform a session recording snapshot was captured on.",- "examples": [- "web",- "mobile"- ],+ "examples": ["web", "mobile"],"label": "Snapshot source","type": "String"},@@ -8978,10 +6849,7 @@},"$survey_name": {"description": "The name of the survey.",- "examples": [- "Product Feedback for New Product",- "Home page NPS"- ],+ "examples": ["Product Feedback for New Product", "Home page NPS"],"label": "Survey name"},"$survey_partially_completed": {@@ -8994,11 +6862,7 @@},"$survey_response": {"description": "The response value for the first question in the survey.",- "examples": [- "I love it!",- 5,- "['choice 1', 'choice 3']"- ],+ "examples": ["I love it!", 5, "['choice 1', 'choice 3']"],"label": "Survey response"},"$survey_response_1": {@@ -9016,17 +6880,13 @@},"$time": {"description": "Use the SQL field `timestamp` instead. This field was previously set on some client side events.",- "examples": [- "1681211521.345"- ],+ "examples": ["1681211521.345"],"label": "$time (deprecated)","system": true},"$timestamp": {"description": "Use the SQL field `timestamp` instead. This field was previously set on some client side events.",- "examples": [- "2023-05-20T15:30:00Z"- ],+ "examples": ["2023-05-20T15:30:00Z"],"label": "Timestamp (deprecated)","system": true},@@ -9054,9 +6914,7 @@},"$user_agent": {"description": "Some SDKs (like Android) send the raw user agent as $user_agent.",- "examples": [- "Dalvik/2.1.0 (Linux; U; Android 11; Pixel 3 Build/RQ2A.210505.002)"- ],+ "examples": ["Dalvik/2.1.0 (Linux; U; Android 11; Pixel 3 Build/RQ2A.210505.002)"],"label": "Raw user agent"},"$user_id": {@@ -9065,38 +6923,24 @@},"$viewport_height": {"description": "The height of the user's actual browser window (in pixels). Data from the last time this user was seen.",- "examples": [- "2094",- "1031"- ],+ "examples": ["2094", "1031"],"label": "Latest viewport height"},"$viewport_width": {"description": "The width of the user's actual browser window (in pixels). Data from the last time this user was seen.",- "examples": [- "1439",- "1915"- ],+ "examples": ["1439", "1915"],"label": "Latest viewport width"},"$virt_initial_channel_type": {"description": "What type of acquisition channel this user initially came from. Learn more about channels types and how to customise them in [our documentation](https://posthog.com/docs/data/channel-type)",- "examples": [- "Paid Search",- "Organic Video",- "Direct"- ],+ "examples": ["Paid Search", "Organic Video", "Direct"],"label": "Initial channel type","type": "String","virtual": true},"$virt_initial_referring_domain_type": {"description": "What type of referring domain this user initially came from.",- "examples": [- "Search",- "Video",- "Direct"- ],+ "examples": ["Search", "Video", "Direct"],"label": "Initial referring domain type","type": "String","virtual": true@@ -9124,11 +6968,7 @@},"$web_vitals_CLS_value": {"description": "Cumulative layout shift, a score without a unit, usually between 0 and 1. Do not plot it on the same axis as the millisecond metrics, and aggregate it with a percentile such as P90 rather than a count or an average. CLS is only final when the page is hidden, so it lands on a later $web_vitals event than LCP and FCP, and the metric counts are not comparable.",- "examples": [- 0.01,- 0.1,- 0.25- ],+ "examples": [0.01, 0.1, 0.25],"label": "Web vitals CLS value","type": "Numeric"},@@ -9137,11 +6977,7 @@},"$web_vitals_FCP_value": {"description": "First contentful paint, in milliseconds: the time until the browser paints the first text or image. Aggregate it with a percentile such as P90, as the web analytics web vitals tab does, rather than a count or an average. Each $web_vitals event only carries the metrics that were ready when it was sent, so the four metrics sit on different sets of events and their counts are not comparable.",- "examples": [- 800,- 1500,- 3000- ],+ "examples": [800, 1500, 3000],"label": "Web vitals FCP value","type": "Numeric"},@@ -9150,11 +6986,7 @@},"$web_vitals_INP_value": {"description": "Interaction to next paint, in milliseconds: how long the page takes to respond to a user interaction. Aggregate it with a percentile such as P90, as the web analytics web vitals tab does, rather than a count or an average. INP is only final when the page is hidden, so it lands on a later $web_vitals event than LCP and FCP. A page with no user interaction has no INP value at all, so the metric counts are not comparable.",- "examples": [- 50,- 200,- 500- ],+ "examples": [50, 200, 500],"label": "Web vitals INP value","type": "Numeric"},@@ -9163,19 +6995,13 @@},"$web_vitals_LCP_value": {"description": "Largest contentful paint, in milliseconds: the time until the largest text or image in the viewport is painted. Aggregate it with a percentile such as P90, as the web analytics web vitals tab does, rather than a count or an average. Each $web_vitals event only carries the metrics that were ready when it was sent, so the four metrics sit on different sets of events and their counts are not comparable.",- "examples": [- 1200,- 2500,- 4000- ],+ "examples": [1200, 2500, 4000],"label": "Web vitals LCP value","type": "Numeric"},"$web_vitals_allowed_metrics": {"description": "Allowed web vitals metrics config.",- "examples": [- "[\"LCP\", \"CLS\"]"- ],+ "examples": ["[\"LCP\", \"CLS\"]"],"label": "Web vitals allowed metrics","system": true},@@ -9185,19 +7011,12 @@},"$webview_app": {"description": "Name of the host app whose in-app browser the event came from, such as an event opened inside the LinkedIn or Instagram app. Set from the user agent when the SDK can identify the host app. Data from the last time this user was seen.",- "examples": [- "LinkedIn",- "Instagram",- "TikTok"- ],+ "examples": ["LinkedIn", "Instagram", "TikTok"],"label": "Latest in-app browser"},"$webview_app_version": {"description": "Version of the host app whose in-app browser the event came from. Data from the last time this user was seen.",- "examples": [- "309.1.0",- "375.0.0"- ],+ "examples": ["309.1.0", "375.0.0"],"label": "Latest in-app browser version"},"$window_id": {@@ -9211,19 +7030,12 @@},"build": {"description": "The build number for the app. Mobile SDKs send this on app lifecycle events only. Most events carry App build ($app_build) instead.",- "examples": [- "1"- ],+ "examples": ["1"],"label": "App build (app lifecycle)"},"currency": {"description": "The currency code associated with the event.",- "examples": [- "USD",- "EUR",- "GBP",- "CAD"- ],+ "examples": ["USD", "EUR", "GBP", "CAD"],"label": "Currency"},"dclid": {@@ -9232,9 +7044,7 @@},"distinct_id": {"description": "The current distinct ID of the user.",- "examples": [- "16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"- ],+ "examples": ["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],"label": "Distinct ID"},"duration_ms": {@@ -9244,11 +7054,7 @@},"email": {"description": "The email address of the user.",- "examples": [- "[email protected]",- "[email protected]",- ],"label": "Email address","type": "String"},@@ -9266,10 +7072,7 @@},"from_background": {"description": "Whether the app was opened for the first time or from the background.",- "examples": [- "true",- "false"- ],+ "examples": ["true", "false"],"label": "From background"},"gad_source": {@@ -9310,10 +7113,7 @@},"mcp_client_name": {"description": "Older unprefixed variant of $mcp_client_name. Emitted on events from the pre-@posthog/mcp code paths; prefer $mcp_client_name for new dashboards.",- "examples": [- "claude-code",- "codex-mcp-client"- ],+ "examples": ["claude-code", "codex-mcp-client"],"label": "MCP client name (unprefixed)"},"mcp_client_version": {@@ -9342,17 +7142,12 @@},"mcp_runtime": {"description": "Server runtime that handled the MCP request. 'hono' means it was served by the Hono-based MCP server.",- "examples": [- "hono"- ],+ "examples": ["hono"],"label": "MCP runtime"},"mcp_session_client_name": {"description": "MCP client name captured at session initialize and carried across every request in that session. Session-scoped counterpart of $mcp_client_name.",- "examples": [- "claude-code",- "codex-mcp-client"- ],+ "examples": ["claude-code", "codex-mcp-client"],"label": "MCP session client name"},"mcp_session_client_version": {@@ -9361,10 +7156,7 @@},"mcp_session_consumer": {"description": "Upstream surface that initiated the MCP session, captured at session initialize. Session-scoped counterpart of $mcp_consumer.",- "examples": [- "posthog-code",- "slack"- ],+ "examples": ["posthog-code", "slack"],"label": "MCP session consumer"},"mcp_session_id": {@@ -9373,18 +7165,12 @@},"mcp_session_protocol_version": {"description": "MCP protocol version negotiated at session initialize and carried across every request in that session.",- "examples": [- "2025-11-25",- "2025-06-18"- ],+ "examples": ["2025-11-25", "2025-06-18"],"label": "MCP session protocol version"},"mcp_session_vendor_client": {"description": "Vendor client captured at session initialize and carried across every request in that session.",- "examples": [- "ClaudeCode",- "ClaudeAI"- ],+ "examples": ["ClaudeCode", "ClaudeAI"],"label": "MCP session vendor client"},"mcp_transport": {@@ -9393,10 +7179,7 @@},"mcp_vendor_client": {"description": "Older unprefixed variant of $mcp_vendor_client, stamped only by PostHog's hosted MCP server. Coalesce both keys when querying vendor identity directly; the harness resolution in MCP analytics already does.",- "examples": [- "ClaudeCode",- "ClaudeAI"- ],+ "examples": ["ClaudeCode", "ClaudeAI"],"label": "MCP vendor client (legacy)"},"mcp_version": {@@ -9414,16 +7197,12 @@},"previous_build": {"description": "The previous build number for the app",- "examples": [- "1"- ],+ "examples": ["1"],"label": "App previous build"},"previous_version": {"description": "The previous version of the app",- "examples": [- "1.0.0"- ],+ "examples": ["1.0.0"],"label": "App previous version"},"qclid": {@@ -9444,9 +7223,7 @@},"referring_application": {"description": "The namespace of the app that made the request.",- "examples": [- "com.posthog.app"- ],+ "examples": ["com.posthog.app"],"label": "Referrer application"},"resource_name": {@@ -9455,9 +7232,7 @@},"revenue": {"description": "The revenue associated with the event. By default, this is in USD, but the currency property can be used to specify a different currency.",- "examples": [- 10.0- ],+ "examples": [10.0],"label": "Revenue"},"scanner_id": {@@ -9470,12 +7245,7 @@},"scanner_type": {"description": "Which kind of analysis ran. Monitors answer a yes/no question, classifiers assign tags, scorers return a number, and summarizers describe the session.",- "examples": [- "monitor",- "classifier",- "scorer",- "summarizer"- ],+ "examples": ["monitor", "classifier", "scorer", "summarizer"],"label": "Scanner type (Replay Vision)"},"scanner_version": {@@ -9489,9 +7259,7 @@},"token": {"description": "Token used for authentication.",- "examples": [- "ph_abcdefg"- ],+ "examples": ["ph_abcdefg"],"ignored_in_assistant": true,"label": "Token"},@@ -9509,67 +7277,42 @@},"url": {"description": "The deep link URL that the app was opened from.",- "examples": [- "https://open.my.app"- ],+ "examples": ["https://open.my.app"],"label": "URL"},"utm_campaign": {"description": "UTM campaign tag. Data from the last time this user was seen.",- "examples": [- "feature launch",- "discount"- ],+ "examples": ["feature launch", "discount"],"label": "Latest UTM campaign"},"utm_content": {"description": "UTM content tag. Data from the last time this user was seen.",- "examples": [- "bottom link",- "second button"- ],+ "examples": ["bottom link", "second button"],"label": "Latest UTM content"},"utm_medium": {"description": "UTM medium tag. Data from the last time this user was seen.",- "examples": [- "Social",- "Organic",- "Paid",- "Email"- ],+ "examples": ["Social", "Organic", "Paid", "Email"],"label": "Latest UTM medium"},"utm_name": {"description": "UTM campaign tag, sent via Segment.",- "examples": [- "feature launch",- "discount"- ],+ "examples": ["feature launch", "discount"],"label": "UTM name"},"utm_source": {"description": "UTM source tag. Data from the last time this user was seen.",- "examples": [- "Google",- "Bing",- "Twitter",- "Facebook"- ],+ "examples": ["Google", "Bing", "Twitter", "Facebook"],"label": "Latest UTM source"},"utm_term": {"description": "UTM term tag. Data from the last time this user was seen.",- "examples": [- "free goodies"- ],+ "examples": ["free goodies"],"label": "Latest UTM term"},"version": {"description": "The version of the app. Mobile SDKs send this on app lifecycle events only. Most events carry App version ($app_version) instead.",- "examples": [- "1.0.0"- ],+ "examples": ["1.0.0"],"label": "App version (app lifecycle)"},"wbraid": {@@ -9594,11 +7337,7 @@},"console_log_level": {"description": "Level of console logs captured",- "examples": [- "info",- "warn",- "error"- ],+ "examples": ["info", "warn", "error"],"label": "Log level"},"console_log_query": {@@ -9617,10 +7356,7 @@},"snapshot_source": {"description": "Platform the session was recorded on",- "examples": [- "web",- "mobile"- ],+ "examples": ["web", "mobile"],"label": "Platform"},"visited_page": {@@ -9741,19 +7477,13 @@"session_properties": {"$autocapture_count": {"description": "The number of autocapture events in this session.",- "examples": [- 123- ],+ "examples": [123],"label": "Autocapture count","type": "Numeric"},"$channel_type": {"description": "What type of acquisition channel this traffic came from.",- "examples": [- "Paid Search",- "Organic Video",- "Direct"- ],+ "examples": ["Paid Search", "Organic Video", "Direct"],"label": "Channel type","type": "String"},@@ -9764,33 +7494,25 @@},"$end_current_url": {"description": "The last URL visited in this session.",- "examples": [- "https://example.com/interesting-article?parameter=true"- ],+ "examples": ["https://example.com/interesting-article?parameter=true"],"label": "End URL","type": "String"},"$end_hostname": {"description": "The hostname of the last URL visited in this session.",- "examples": [- "example.com"- ],+ "examples": ["example.com"],"label": "End hostname","type": "String"},"$end_pathname": {"description": "The last pathname visited in this session.",- "examples": [- "/interesting-article?parameter=true"- ],+ "examples": ["/interesting-article?parameter=true"],"label": "End pathname","type": "String"},"$end_timestamp": {"description": "The timestamp of the last event from this session.",- "examples": [- "2023-05-20T16:30:00Z"- ],+ "examples": ["2023-05-20T16:30:00Z"],"label": "End timestamp","type": "DateTime"},@@ -9800,9 +7522,7 @@},"$entry_current_url": {"description": "The first URL visited in this session.",- "examples": [- "https://example.com/interesting-article?parameter=true"- ],+ "examples": ["https://example.com/interesting-article?parameter=true"],"label": "Entry URL","type": "String"},@@ -9836,9 +7556,7 @@},"$entry_hostname": {"description": "The hostname of the first URL visited in this session.",- "examples": [- "example.com"- ],+ "examples": ["example.com"],"label": "Entry hostname","type": "String"},@@ -9864,9 +7582,7 @@},"$entry_pathname": {"description": "The first pathname visited in this session.",- "examples": [- "/interesting-article?parameter=true"- ],+ "examples": ["/interesting-article?parameter=true"],"label": "Entry pathname","type": "String"},@@ -9880,10 +7596,7 @@},"$entry_referring_domain": {"description": "Domain of where the user came from. Data from the first event in this session.",- "examples": [- "google.com",- "facebook.com"- ],+ "examples": ["google.com", "facebook.com"],"label": "Entry referring domain"},"$entry_sccid": {@@ -9900,45 +7613,27 @@},"$entry_utm_campaign": {"description": "UTM campaign tag. Data from the first event in this session.",- "examples": [- "feature launch",- "discount"- ],+ "examples": ["feature launch", "discount"],"label": "Entry UTM campaign"},"$entry_utm_content": {"description": "UTM content tag. Data from the first event in this session.",- "examples": [- "bottom link",- "second button"- ],+ "examples": ["bottom link", "second button"],"label": "Entry UTM content"},"$entry_utm_medium": {"description": "UTM medium tag. Data from the first event in this session.",- "examples": [- "Social",- "Organic",- "Paid",- "Email"- ],+ "examples": ["Social", "Organic", "Paid", "Email"],"label": "Entry UTM medium"},"$entry_utm_source": {"description": "UTM source tag. Data from the first event in this session.",- "examples": [- "Google",- "Bing",- "Twitter",- "Facebook"- ],+ "examples": ["Google", "Bing", "Twitter", "Facebook"],"label": "Entry UTM source"},"$entry_utm_term": {"description": "UTM term tag. Data from the first event in this session.",- "examples": [- "free goodies"- ],+ "examples": ["free goodies"],"label": "Entry UTM term"},"$entry_wbraid": {@@ -9947,17 +7642,13 @@},"$exit_current_url": {"description": "The last URL visited in this session. (deprecated, use $end_current_url).",- "examples": [- "https://example.com/interesting-article?parameter=true"- ],+ "examples": ["https://example.com/interesting-article?parameter=true"],"label": "Exit URL","type": "String"},"$exit_pathname": {"description": "The last pathname visited in this session. (deprecated, use $end_pathname).",- "examples": [- "/interesting-article?parameter=true"- ],+ "examples": ["/interesting-article?parameter=true"],"label": "Exit pathname","type": "String"},@@ -9978,59 +7669,42 @@},"$is_bounce": {"description": "Whether the session was a bounce.",- "examples": [- true,- false- ],+ "examples": [true, false],"label": "Is bounce","type": "Boolean"},"$last_external_click_url": {"description": "The last external URL clicked in this session.",- "examples": [- "https://example.com/interesting-article?parameter=true"- ],+ "examples": ["https://example.com/interesting-article?parameter=true"],"label": "Last external click URL"},"$num_uniq_urls": {"description": "The number of unique URLs visited during the session.",- "examples": [- 3- ],+ "examples": [3],"label": "Number of unique URLs","type": "Numeric"},"$pageview_count": {"description": "The number of page view events in this session.",- "examples": [- 123- ],+ "examples": [123],"label": "Pageview count","type": "Numeric"},"$screen_count": {"description": "The number of screen events in this session.",- "examples": [- 123- ],+ "examples": [123],"label": "Screen count","type": "Numeric"},"$session_duration": {"description": "The duration of the session being tracked. Learn more about how PostHog tracks sessions in [our documentation](https://posthog.com/docs/user-guides/sessions).\n\nNote: If the duration is formatted as a single number (not `HH:MM:SS`), it's in seconds.",- "examples": [- 30,- 146,- 2- ],+ "examples": [30, 146, 2],"label": "Session duration","type": "Numeric"},"$start_timestamp": {"description": "The timestamp of the first event from this session.",- "examples": [- "2023-05-20T15:30:00Z"- ],+ "examples": ["2023-05-20T15:30:00Z"],"label": "Start timestamp","type": "DateTime"},@@ -10041,10 +7715,8 @@},"$vitals_lcp": {"description": "The time it took for the Largest Contentful Paint on the page. This captures the perceived load time of the page, and measure how long it took for the main content of the page to be visible to users.",- "examples": [- "2.2"- ],+ "examples": ["2.2"],"label": "Web vitals LCP"}}-}\ No newline at end of file+}diff --git a/frontend/src/taxonomy/coreFilterDefinitions.test.ts b/frontend/src/taxonomy/coreFilterDefinitions.test.tsdeleted file mode 100644index bbc3d7ba84f1..000000000000--- a/frontend/src/taxonomy/coreFilterDefinitions.test.ts+++ /dev/null@@ -1,22 +0,0 @@-import * as fs from 'fs'-import * as path from 'path'--const REPO_ROOT = path.resolve(__dirname, '../../..')-const GENERATED_JSON = 'frontend/src/taxonomy/core-filter-definitions-by-group.json'--describe('core filter definitions JSON', () => {- test('stays in the oxfmt ignore list, so the Python generator owns its bytes', () => {- const config = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, '.oxfmtrc.json'), 'utf-8'))- const ignorePatterns: string[] = config.ignorePatterns ?? []-- const missingEntryHint = ignorePatterns.includes(GENERATED_JSON)- ? undefined- : `${GENERATED_JSON} is missing from ignorePatterns in .oxfmtrc.json. lint-staged pipes staged JSON ` +- 'through `bin/hogli format:yaml` (oxfmt), and that entry is the only thing keeping oxfmt off ' +- 'this file. Without it the committed bytes stop matching the json.dump output of ' +- 'posthog/taxonomy/projection.py, so the projections drift check in ci-python.yml fails for whoever ' +- 'next edits posthog/taxonomy/taxonomy.py. Restore the entry rather than reformatting the JSON.'-- expect(missingEntryHint).toBeUndefined()- })-})diff --git a/packages/agent/biome.jsonc b/packages/agent/biome.jsoncindex bddfb9a0b741..b72d995eaff7 100644--- a/packages/agent/biome.jsonc+++ b/packages/agent/biome.jsonc@@ -40,15 +40,6 @@}},"overrides": [- {- // Object-tag kind registry generated from posthog/object_tags/kinds.py; the- // generator's byte-stable output is what `hogli build:object-tags --check`- // compares against, so no formatter may touch it.- "includes": ["packages/agent-contracts/src/objectTagKinds.generated.ts"],- "formatter": {- "enabled": false- }- },{// Disallow console.* in agent source code - use logger instead"includes": ["packages/agent/src/**/*.ts"],diff --git a/packages/agent/packages/agent-contracts/src/model-catalog.generated.ts b/packages/agent/packages/agent-contracts/src/model-catalog.generated.tsindex c265064eae8d..c0debcf12030 100644--- a/packages/agent/packages/agent-contracts/src/model-catalog.generated.ts+++ b/packages/agent/packages/agent-contracts/src/model-catalog.generated.ts@@ -89,31 +89,47 @@ export interface CatalogModel {runtimeAdapter: RuntimeAdapter;/** Empty for a model with no effort control: render no dropdown. */reasoningEfforts: readonly ReasoningEffort[];- /** What a picker shows. Resolved when this file is generated, so every- surface names a model the same way without carrying a formatter. */+ /**+ * What a picker shows. Resolved when this file is generated, so every+ * surface names a model the same way without carrying a formatter.+ */label: string;- /** Feature flag a person needs before a picker offers this model. Absent- means generally available. Governs display only — the server decides- whether a run may use it. */+ /**+ * Feature flag a person needs before a picker offers this model. Absent+ * means generally available. Governs display only — the server decides+ * whether a run may use it.+ */accessFlag?: string;- /** Base list price in US dollars per million tokens. Absent for a model no- public price list covers, which a picker shows with no cost at all. */+ /**+ * Base list price in US dollars per million tokens. Absent for a model no+ * public price list covers, which a picker shows with no cost at all.+ */cost?: ModelCost;- /** Per-token cost against Claude Sonnet 5, ready to render: `2.5×`,- `≈0.55×`, or `1× base`. Prefixed when input and output rates diverge- enough that one number flatters either. Absent whenever `cost` is. */+ /**+ * Per-token cost against Claude Sonnet 5, ready to render: `2.5×`,+ * `≈0.55×`, or `1× base`. Prefixed when input and output rates diverge+ * enough that one number flatters either. Absent whenever `cost` is.+ */costMultiplier?: string;- /** The rates behind the multiplier, ready to render. Absent whenever- `cost` is. */+ /**+ * The rates behind the multiplier, ready to render. Absent whenever+ * `cost` is.+ */costSummary?: string;- /** Runs with the 1M-token context window. Absent means it does not, and a- picker offers no window choice. */+ /**+ * Runs with the 1M-token context window. Absent means it does not, and a+ * picker offers no window choice.+ */supports1MContext?: boolean;- /** Runs in fast mode. Absent means it does not, and a picker offers no- fast-mode toggle. */+ /**+ * Runs in fast mode. Absent means it does not, and a picker offers no+ * fast-mode toggle.+ */supportsFastMode?: boolean;- /** Superseded: no picker offers it, and a session already pinned to it- still runs and still reads its name and cost from here. */+ /**+ * Superseded: no picker offers it, and a session already pinned to it+ * still runs and still reads its name and cost from here.+ */retired?: boolean;}diff --git a/packages/agent/packages/agent-contracts/src/objectTagKinds.generated.ts b/packages/agent/packages/agent-contracts/src/objectTagKinds.generated.tsindex 6ee8254492f0..ea03c315d9c5 100644--- a/packages/agent/packages/agent-contracts/src/objectTagKinds.generated.ts+++ b/packages/agent/packages/agent-contracts/src/objectTagKinds.generated.ts@@ -3,4 +3,5 @@// run `hogli build:projections` and commit the result./** The kind list the rich-output prompt teaches agents. */-export const OBJECT_TAG_PROMPT_KIND_LIST = "insight, dashboard, error, replay, flag, experiment, survey, ticket, report, trace, eval, event, cohort, action, person";+export const OBJECT_TAG_PROMPT_KIND_LIST =+ "insight, dashboard, error, replay, flag, experiment, survey, ticket, report, trace, eval, event, cohort, action, person";diff --git a/posthog/object_tags/projection.py b/posthog/object_tags/projection.pyindex 9c752812b0b5..f6dacb1edba5 100755--- a/posthog/object_tags/projection.py+++ b/posthog/object_tags/projection.py@@ -92,9 +92,6 @@ def render_prompt_kinds_ts() -> str:def render() -> dict[str, str]:- # Nothing reformats these outputs before they reach the files. The other halves of- # that guarantee are the ignorePatterns entry in .oxfmtrc.json (frontend copy) and- # the generated-files override in products/desktop/biome.jsonc (desktop copies).registry = render_registry_ts()return {"products/desktop/packages/core/src/inbox/objectKinds.generated.ts": registry,diff --git a/posthog/scopes_projection.py b/posthog/scopes_projection.pyindex 83265c14bc9f..7ca377504fa1 100755--- a/posthog/scopes_projection.py+++ b/posthog/scopes_projection.py@@ -23,6 +23,7 @@ Registered in `tools/hogli-commands/hogli_commands/projections.py`; runfrom __future__ import annotations+import jsonimport runpyfrom pathlib import Path@@ -39,15 +40,8 @@ def render_oauth_scopes() -> str:all_scopes: list[str] = scopes_globals["get_oauth_scopes_supported"]()hidden_scopes: list[str] = sorted(scopes_globals["OAUTH_SCOPES_HIDDEN"])- # oxfmt enforces single quotes; format manually rather than json.dumps so- # the generator output is byte-stable regardless of formatter rules. Scope- # names are simple snake_case identifiers + colons and never need escaping,- # but assert that to fail loudly if a scope ever does.- for s in [*all_scopes, *hidden_scopes]:- if "'" in s or "\\" in s:- raise RuntimeError(f"unexpected character in scope name: {s!r}")- body = ",\n".join(f" '{s}'" for s in all_scopes)- hidden_body = ",\n".join(f" '{s}'" for s in hidden_scopes)+ body = ",\n".join(f" {json.dumps(s)}" for s in all_scopes)+ hidden_body = ",\n".join(f" {json.dumps(s)}" for s in hidden_scopes)output = ("// AUTO-GENERATED by posthog/scopes_projection.py from posthog/scopes.py.\n""// Regenerate with `hogli build:projections`. Do not edit.\n"diff --git a/posthog/taxonomy/projection.py b/posthog/taxonomy/projection.pyindex 411e54a37401..e3586fdbd50d 100755--- a/posthog/taxonomy/projection.py+++ b/posthog/taxonomy/projection.py@@ -32,13 +32,7 @@ def render_mcp_allowlist() -> str:test, because capture does not reserve the namespace."""names = sorted(name for name in CORE_FILTER_DEFINITIONS_BY_GROUP["event_properties"] if name.startswith("$ai_"))- # oxfmt wants single quotes, so format by hand rather than with json.dumps and- # keep the output byte-stable. A taxonomy name never needs escaping; assert it- # so one that does fails the build instead of the TypeScript parse.- for name in names:- if "'" in name or "\\" in name:- raise RuntimeError(f"unexpected character in property name: {name!r}")- body = ",\n".join(f" '{name}'" for name in names)+ body = ",\n".join(f" {json.dumps(name)}" for name in names)return ("// THIS FILE IS AUTOGENERATED from posthog/taxonomy/taxonomy.py. DO NOT EDIT\n""// MANUALLY. To update: hogli build:projections\n"@@ -53,6 +47,4 @@ def render_mcp_allowlist() -> str:def render() -> dict[str, str]:- # The JSON stays in the .oxfmtrc.json ignorePatterns: lint-staged pipes staged JSON- # through oxfmt, and a reformat would stop the bytes matching this output.return {OUTPUT: render_core_filter_definitions(), MCP_ALLOWLIST_OUTPUT: render_mcp_allowlist()}diff --git a/posthog/test/repo_invariants/test_generated_files_are_registered.py b/posthog/test/repo_invariants/test_generated_files_are_registered.pyindex a42a7f3be3d8..d149c08ced45 100644--- a/posthog/test/repo_invariants/test_generated_files_are_registered.py+++ b/posthog/test/repo_invariants/test_generated_files_are_registered.py@@ -1,9 +1,10 @@+import jsonimport subprocessfrom pathlib import Pathimport yamlfrom hogli_commands.change_detection import matches_globs-from hogli_commands.projections import PROJECTIONS+from hogli_commands.projections import OXFMT, PROJECTIONS, formatter_forREPO_ROOT = Path(__file__).resolve().parents[3]@@ -92,3 +93,18 @@ def test_every_output_reaches_the_drift_check() -> None:f"Projection outputs missing from the `python` paths filter in ci-python.yml: {missing}. ""Add them, so a hand-edit still runs `hogli build:projections --check`.")+++def test_oxfmt_ignores_no_projection_output() -> None:+ ignored = json.loads((REPO_ROOT / OXFMT.config).read_text())["ignorePatterns"]+ skipped = [+ output+ for projection in PROJECTIONS+ for output in projection.outputs+ if formatter_for(output) == OXFMT and matches_globs(output, ignored)+ ]++ assert skipped == [], (+ f"{OXFMT.config} ignores projection outputs: {skipped}. oxfmt returns an ignored file "+ "unchanged, so the output would skip house style without an error. Remove the pattern."+ )diff --git a/products/desktop/biome.jsonc b/products/desktop/biome.jsoncindex 27d792a871cf..140621961463 100644--- a/products/desktop/biome.jsonc+++ b/products/desktop/biome.jsonc@@ -122,15 +122,6 @@"enabled": false}},- {- // Object-tag kind registry generated from posthog/object_tags/kinds.py; the- // renderer's byte-stable output is what `hogli build:projections --check`- // compares against, so no formatter may touch it.- "includes": ["packages/core/src/inbox/objectKinds.generated.ts"],- "formatter": {- "enabled": false- }- },{// TanStack Router generated route tree — uses `as any` and its own// formatting; the file header explicitly says not to lint/format it.@@ -146,8 +137,12 @@}},{- // Disallow console.* in Code source code - use logger instead- "includes": ["apps/code/src/**/*.ts", "apps/code/src/**/*.tsx"],+ // Disallow console.* in Code and agent source code - use logger instead+ "includes": [+ "apps/code/src/**/*.ts",+ "apps/code/src/**/*.tsx",+ "packages/agent/src/**/*.ts"+ ],"linter": {"rules": {"suspicious": {@@ -159,6 +154,7 @@{// Logger implementations intentionally wrap console"includes": [+ "packages/agent/src/utils/logger.ts","apps/code/src/main/lib/logger.ts","apps/code/src/renderer/lib/logger.ts"],diff --git a/products/desktop/packages/core/src/inbox/objectKinds.generated.ts b/products/desktop/packages/core/src/inbox/objectKinds.generated.tsindex c2843d936fb4..a1f8536a4e33 100644--- a/products/desktop/packages/core/src/inbox/objectKinds.generated.ts+++ b/products/desktop/packages/core/src/inbox/objectKinds.generated.ts@@ -159,11 +159,11 @@ export type ObjectKindName = keyof typeof OBJECT_KIND_DATA;/** Alternate tag names agents plausibly write, mapped to registry kinds. */export const OBJECT_KIND_ALIASES: Record<string, string> = {"session-replay": "replay",- "session_replay": "replay",- "recording": "replay",+ session_replay: "replay",+ recording: "replay","feature-flag": "flag",- "feature_flag": "flag",- "sql": "hogql",+ feature_flag: "flag",+ sql: "hogql",};/** Rendering fallback for a tag whose kind nobody registered. */diff --git a/products/tasks/frontend/modelCatalog.generated.ts b/products/tasks/frontend/modelCatalog.generated.tsindex 51d134547bb0..4569ed5d3cab 100644--- a/products/tasks/frontend/modelCatalog.generated.ts+++ b/products/tasks/frontend/modelCatalog.generated.ts@@ -76,31 +76,47 @@ export interface CatalogModel {runtimeAdapter: RuntimeAdapter/** Empty for a model with no effort control: render no dropdown. */reasoningEfforts: readonly ReasoningEffort[]- /** What a picker shows. Resolved when this file is generated, so every- surface names a model the same way without carrying a formatter. */+ /**+ * What a picker shows. Resolved when this file is generated, so every+ * surface names a model the same way without carrying a formatter.+ */label: string- /** Feature flag a person needs before a picker offers this model. Absent- means generally available. Governs display only — the server decides- whether a run may use it. */+ /**+ * Feature flag a person needs before a picker offers this model. Absent+ * means generally available. Governs display only — the server decides+ * whether a run may use it.+ */accessFlag?: string- /** Base list price in US dollars per million tokens. Absent for a model no- public price list covers, which a picker shows with no cost at all. */+ /**+ * Base list price in US dollars per million tokens. Absent for a model no+ * public price list covers, which a picker shows with no cost at all.+ */cost?: ModelCost- /** Per-token cost against Claude Sonnet 5, ready to render: `2.5×`,- `≈0.55×`, or `1× base`. Prefixed when input and output rates diverge- enough that one number flatters either. Absent whenever `cost` is. */+ /**+ * Per-token cost against Claude Sonnet 5, ready to render: `2.5×`,+ * `≈0.55×`, or `1× base`. Prefixed when input and output rates diverge+ * enough that one number flatters either. Absent whenever `cost` is.+ */costMultiplier?: string- /** The rates behind the multiplier, ready to render. Absent whenever- `cost` is. */+ /**+ * The rates behind the multiplier, ready to render. Absent whenever+ * `cost` is.+ */costSummary?: string- /** Runs with the 1M-token context window. Absent means it does not, and a- picker offers no window choice. */+ /**+ * Runs with the 1M-token context window. Absent means it does not, and a+ * picker offers no window choice.+ */supports1MContext?: boolean- /** Runs in fast mode. Absent means it does not, and a picker offers no- fast-mode toggle. */+ /**+ * Runs in fast mode. Absent means it does not, and a picker offers no+ * fast-mode toggle.+ */supportsFastMode?: boolean- /** Superseded: no picker offers it, and a session already pinned to it- still runs and still reads its name and cost from here. */+ /**+ * Superseded: no picker offers it, and a session already pinned to it+ * still runs and still reads its name and cost from here.+ */retired?: boolean}diff --git a/products/tasks/scripts/model_catalog_projection.py b/products/tasks/scripts/model_catalog_projection.pyindex c083fccaec8a..ac0106ff737d 100755--- a/products/tasks/scripts/model_catalog_projection.py+++ b/products/tasks/scripts/model_catalog_projection.py@@ -5,19 +5,9 @@ checked-in ``*.generated.ts`` files, so the Python module stays the single authothe TypeScript sides are projections of it. It lives beside the catalog it projects,since only this product reads it.-Two files come out of one template because the two workspaces run different formatters —-the web app runs oxfmt (four spaces, single quotes, no semicolons, 120 columns) and the-desktop app runs Biome (two spaces, double quotes, semicolons, 80 columns). Each file is-emitted in the shape its own formatter would produce, so a later ``pnpm format`` never-turns generated output into a diff. Objects are written one property per line, which both-formatters preserve regardless of width; arrays and unions are wrapped against the target-width, because both formatters collapse those whenever they fit.--Emitting that shape rather than shelling out to each formatter is a deliberate trade. It-costs a small amount of formatter emulation here, and it buys a ``render()`` whose output-is byte-exact, which is what lets the drift test compare the checked-in files against this-module with no Node in the loop. ``check_fits`` is the guard on that bargain: a line the-target formatter would rewrap fails the build instead of drifting silently.+Both files come out of one template. The projection runner formats each through the+formatter of the workspace that owns it, oxfmt for the web app and Biome for the desktop+app, so the template only has to be valid TypeScript.Only data is generated. The lookup built on it lives in``packages/agent/packages/agent-contracts/src/model-catalog.ts`` and, for Python, in the source@@ -30,8 +20,8 @@ Registered in `tools/hogli-commands/hogli_commands/projections.py`; runfrom __future__ import annotations+import jsonimport runpy-from dataclasses import dataclassfrom pathlib import Pathfrom typing import Any@@ -49,52 +39,25 @@ HEADER = """// AUTO-GENERATED by products/tasks/scripts/model_catalog_projection// built on this file can only offer a selection the API will accept."""-@dataclass(frozen=True)-class Style:- """How one workspace's formatter wants generated TypeScript to look."""-- indent: str- quote: str- semi: str- width: int-- def s(self, value: str) -> str:- """A string literal. Catalog values are lowercase ids: letters, digits, `-./@` only."""- if self.quote in value or "\\" in value:- raise RuntimeError(f"unexpected character in catalog value: {value!r}")- return f"{self.quote}{value}{self.quote}"-- @staticmethod- def n(value: float) -> str:- """A number literal, written the way a hand-typed rate would be: `5`, not `5.0`."""- return str(int(value)) if float(value).is_integer() else repr(float(value))-- def array(self, values: tuple[str, ...], *, prefix: str, suffix: str, depth: int) -> str:- """An array literal, wrapped one item per line when the single-line form is too wide."""- pad = self.indent * depth- items = [self.s(value) for value in values]- single = f"{pad}{prefix}[{', '.join(items)}]{suffix}"- if len(single) <= self.width:- return single- inner = "".join(f"{pad}{self.indent}{item},\n" for item in items)- return f"{pad}{prefix}[\n{inner}{pad}]{suffix}"-- def union(self, values: tuple[str, ...], *, prefix: str) -> str:- """A string-literal union, broken onto leading-pipe lines when too wide."""- items = [self.s(value) for value in values]- single = f"{prefix}{' | '.join(items)}{self.semi}"- if len(single) <= self.width:- return single- broken = "".join(f"{self.indent}| {item}\n" for item in items)- return f"{prefix.rstrip()}\n{broken.rstrip()}{self.semi}"---OXFMT = Style(indent=" " * 4, quote="'", semi="", width=120)-BIOME = Style(indent=" " * 2, quote='"', semi=";", width=80)---def render_catalog(catalog: dict[str, Any], style: Style) -> str:- i, semi = style.indent, style.semi+def _s(value: str) -> str:+ return json.dumps(value, ensure_ascii=False)+++def _n(value: float) -> str:+ """A number literal, written the way a hand-typed rate would be: `5`, not `5.0`."""+ return str(int(value)) if float(value).is_integer() else repr(float(value))+++def _array(values: tuple[str, ...]) -> str:+ return f"[{', '.join(_s(value) for value in values)}]"+++def _union(values: tuple[str, ...]) -> str:+ return " | ".join(_s(value) for value in values)+++def render_catalog(catalog: dict[str, Any]) -> str:+ i, semi = " ", ";"adapters: tuple[str, ...] = catalog["RUNTIME_ADAPTERS"]providers: dict[str, str] = catalog["PROVIDER_BY_RUNTIME_ADAPTER"]defaults: dict[str, str] = catalog["DEFAULT_MODEL_BY_RUNTIME_ADAPTER"]@@ -109,9 +72,9 @@ def render_catalog(catalog: dict[str, Any], style: Style) -> str:display_name = catalog["display_name_for_model"]multiplier_label = catalog["cost_multiplier_label"]cost_rates = catalog["format_cost_rates"]- baseline_id = style.s(catalog["COST_BASELINE_MODEL"])+ baseline_id = _s(catalog["COST_BASELINE_MODEL"])baseline_label = display_name(catalog["COST_BASELINE_MODEL"])- baseline_label_literal = style.s(baseline_label)+ baseline_label_literal = _s(baseline_label)def cost_lines(model: Any) -> list[str]:"""The rates, and the two strings read off them, or nothing for an unpriced model.@@ -122,45 +85,36 @@ def render_catalog(catalog: dict[str, Any], style: Style) -> str:"""if model.cost is None:return []- lines = [+ tier = model.cost.long_context+ return [f"{i}{i}cost: {{",- f"{i}{i}{i}inputPerMtok: {style.n(model.cost.input_per_mtok)},",- f"{i}{i}{i}outputPerMtok: {style.n(model.cost.output_per_mtok)},",- ]- if model.cost.long_context:- tier = model.cost.long_context- lines.extend(+ f"{i}{i}{i}inputPerMtok: {_n(model.cost.input_per_mtok)},",+ f"{i}{i}{i}outputPerMtok: {_n(model.cost.output_per_mtok)},",+ *([f"{i}{i}{i}longContext: {{",f"{i}{i}{i}{i}aboveInputTokens: {tier.above_input_tokens},",- f"{i}{i}{i}{i}inputPerMtok: {style.n(tier.input_per_mtok)},",- f"{i}{i}{i}{i}outputPerMtok: {style.n(tier.output_per_mtok)},",+ f"{i}{i}{i}{i}inputPerMtok: {_n(tier.input_per_mtok)},",+ f"{i}{i}{i}{i}outputPerMtok: {_n(tier.output_per_mtok)},",f"{i}{i}{i}}},",]- )- lines.extend(- [- f"{i}{i}}},",- f"{i}{i}costMultiplier: {style.s(multiplier_label(model.id))},",- ]- )- summary = style.s(cost_rates(model.cost))- summary_line = f"{i}{i}costSummary: {summary},"- if len(summary_line) <= style.width:- lines.append(summary_line)- else:- lines.extend([f"{i}{i}costSummary:", f"{i}{i}{i}{summary},"])- return lines+ if tier+ else []+ ),+ f"{i}{i}}},",+ f"{i}{i}costMultiplier: {_s(multiplier_label(model.id))},",+ f"{i}{i}costSummary: {_s(cost_rates(model.cost))},",+ ]def model_entry(model: Any) -> str:return "\n".join([f"{i}{{",- f"{i}{i}id: {style.s(model.id)},",- f"{i}{i}runtimeAdapter: {style.s(model.runtime_adapter)},",- style.array(model.reasoning_efforts, prefix="reasoningEfforts: ", suffix=",", depth=2),- f"{i}{i}label: {style.s(display_name(model.id))},",- *([f"{i}{i}accessFlag: {style.s(model.access_flag)},"] if model.access_flag else []),+ f"{i}{i}id: {_s(model.id)},",+ f"{i}{i}runtimeAdapter: {_s(model.runtime_adapter)},",+ f"{i}{i}reasoningEfforts: {_array(model.reasoning_efforts)},",+ f"{i}{i}label: {_s(display_name(model.id))},",+ *([f"{i}{i}accessFlag: {_s(model.access_flag)},"] if model.access_flag else []),*cost_lines(model),*([f"{i}{i}supports1MContext: true,"] if model.supports_1m_context else []),*([f"{i}{i}supportsFastMode: true,"] if model.supports_fast_mode else []),@@ -173,9 +127,9 @@ def render_catalog(catalog: dict[str, Any], style: Style) -> str:return "\n".join([f"{i}{{",- f"{i}{i}runtime: {style.s(option.runtime)},",- *([f"{i}{i}runtimeAdapter: {style.s(option.runtime_adapter)},"] if option.runtime_adapter else []),- f"{i}{i}label: {style.s(option.label)},",+ f"{i}{i}runtime: {_s(option.runtime)},",+ *([f"{i}{i}runtimeAdapter: {_s(option.runtime_adapter)},"] if option.runtime_adapter else []),+ f"{i}{i}label: {_s(option.label)},",f"{i}}},",])@@ -186,8 +140,8 @@ def render_catalog(catalog: dict[str, Any], style: Style) -> str:"\n".join([f"{i}{i}{{",- f"{i}{i}{i}model: {style.s(notch.model)},",- f"{i}{i}{i}effort: {style.s(notch.effort)},",+ f"{i}{i}{i}model: {_s(notch.model)},",+ f"{i}{i}{i}effort: {_s(notch.effort)},",f"{i}{i}}},",])@@ -197,29 +151,27 @@ def render_catalog(catalog: dict[str, Any], style: Style) -> str:model_entries = "\n".join(model_entry(model) for model in models)runtime_option_entries = "\n".join(runtime_option_entry(option) for option in runtime_options)- effort_label_entries = "\n".join(f"{i}{effort}: {style.s(effort_labels[effort])}," for effort in efforts)+ effort_label_entries = "\n".join(f"{i}{effort}: {_s(effort_labels[effort])}," for effort in efforts)ladder_adapter_entries = "\n".join(ladder_entries(adapter) for adapter in adapters)- provider_entries = "\n".join(f"{i}{adapter}: {style.s(providers[adapter])}," for adapter in adapters)- default_entries = "\n".join(f"{i}{adapter}: {style.s(defaults[adapter])}," for adapter in adapters)+ provider_entries = "\n".join(f"{i}{adapter}: {_s(providers[adapter])}," for adapter in adapters)+ default_entries = "\n".join(f"{i}{adapter}: {_s(defaults[adapter])}," for adapter in adapters)fallback_entries = "\n".join(- style.array(fallbacks[adapter], prefix=f"{adapter}: ", suffix=",", depth=1)- for adapter in adapters- if adapter in fallbacks+ f"{i}{adapter}: {_array(fallbacks[adapter])}," for adapter in adapters if adapter in fallbacks)family_entries = "\n".join(f"{i}{{\n"- f"{i}{i}runtimeAdapter: {style.s(adapter)},\n"- f"{i}{i}prefix: {style.s(prefix)},\n"- f"{style.array(family_efforts, prefix='reasoningEfforts: ', suffix=',', depth=2)}\n"+ f"{i}{i}runtimeAdapter: {_s(adapter)},\n"+ f"{i}{i}prefix: {_s(prefix)},\n"+ f"{i}{i}reasoningEfforts: {_array(family_efforts)},\n"f"{i}}},"for adapter, prefix, family_efforts in families)return f"""{HEADER}-{style.union(adapters, prefix="export type RuntimeAdapter = ")}+export type RuntimeAdapter = {_union(adapters)}{semi}-{style.union(runtimes, prefix="export type Runtime = ")}+export type Runtime = {_union(runtimes)}{semi}export interface RuntimeOption {{{i}runtime: Runtime{semi}@@ -236,9 +188,9 @@ export const RUNTIME_OPTIONS: readonly RuntimeOption[] = []{semi}/** Thinking depths, shallowest first. */-{style.union(efforts, prefix="export type ReasoningEffort = ")}+export type ReasoningEffort = {_union(efforts)}{semi}-{style.array(efforts, prefix="export const REASONING_EFFORTS: readonly ReasoningEffort[] = ", suffix=semi, depth=0)}+export const REASONING_EFFORTS: readonly ReasoningEffort[] = {_array(efforts)}{semi}/** What a picker calls each depth. */export const REASONING_EFFORT_LABELS: Record<ReasoningEffort, string> = {{@@ -268,31 +220,47 @@ export interface CatalogModel {{{i}runtimeAdapter: RuntimeAdapter{semi}{i}/** Empty for a model with no effort control: render no dropdown. */{i}reasoningEfforts: readonly ReasoningEffort[]{semi}-{i}/** What a picker shows. Resolved when this file is generated, so every-{i} surface names a model the same way without carrying a formatter. */+{i}/**+{i} * What a picker shows. Resolved when this file is generated, so every+{i} * surface names a model the same way without carrying a formatter.+{i} */{i}label: string{semi}-{i}/** Feature flag a person needs before a picker offers this model. Absent-{i} means generally available. Governs display only — the server decides-{i} whether a run may use it. */+{i}/**+{i} * Feature flag a person needs before a picker offers this model. Absent+{i} * means generally available. Governs display only — the server decides+{i} * whether a run may use it.+{i} */{i}accessFlag?: string{semi}-{i}/** Base list price in US dollars per million tokens. Absent for a model no-{i} public price list covers, which a picker shows with no cost at all. */+{i}/**+{i} * Base list price in US dollars per million tokens. Absent for a model no+{i} * public price list covers, which a picker shows with no cost at all.+{i} */{i}cost?: ModelCost{semi}-{i}/** Per-token cost against {baseline_label}, ready to render: `2.5×`,-{i} `≈0.55×`, or `1× base`. Prefixed when input and output rates diverge-{i} enough that one number flatters either. Absent whenever `cost` is. */+{i}/**+{i} * Per-token cost against {baseline_label}, ready to render: `2.5×`,+{i} * `≈0.55×`, or `1× base`. Prefixed when input and output rates diverge+{i} * enough that one number flatters either. Absent whenever `cost` is.+{i} */{i}costMultiplier?: string{semi}-{i}/** The rates behind the multiplier, ready to render. Absent whenever-{i} `cost` is. */+{i}/**+{i} * The rates behind the multiplier, ready to render. Absent whenever+{i} * `cost` is.+{i} */{i}costSummary?: string{semi}-{i}/** Runs with the 1M-token context window. Absent means it does not, and a-{i} picker offers no window choice. */+{i}/**+{i} * Runs with the 1M-token context window. Absent means it does not, and a+{i} * picker offers no window choice.+{i} */{i}supports1MContext?: boolean{semi}-{i}/** Runs in fast mode. Absent means it does not, and a picker offers no-{i} fast-mode toggle. */+{i}/**+{i} * Runs in fast mode. Absent means it does not, and a picker offers no+{i} * fast-mode toggle.+{i} */{i}supportsFastMode?: boolean{semi}-{i}/** Superseded: no picker offers it, and a session already pinned to it-{i} still runs and still reads its name and cost from here. */+{i}/**+{i} * Superseded: no picker offers it, and a session already pinned to it+{i} * still runs and still reads its name and cost from here.+{i} */{i}retired?: boolean{semi}}}@@ -306,7 +274,7 @@ export const PROVIDER_BY_RUNTIME_ADAPTER: ByRuntimeAdapter<string> = {{{provider_entries}}}{semi}-{style.array(adapters, prefix="export const RUNTIME_ADAPTERS: readonly RuntimeAdapter[] = ", suffix=semi, depth=0)}+export const RUNTIME_ADAPTERS: readonly RuntimeAdapter[] = {_array(adapters)}{semi}export const MODELS: readonly CatalogModel[] = [{model_entries}@@ -356,30 +324,10 @@ export const FALLBACK_REASONING_EFFORTS: FallbackEfforts = {{"""-def check_fits(rendered: str, style: Style, output: str) -> None:- """Fail on a line the target formatter would rewrap.-- Every line here is already in the shape its formatter produces, which is what keeps a- ``pnpm format`` run from turning generated output into a diff. A model id long enough- to push a line past the column limit breaks that quietly, so it stops the build- instead — the fix is to shorten the emitted shape, not to accept the drift.- """- too_long = [line for line in rendered.splitlines() if len(line) > style.width]- if too_long:- raise RuntimeError(- f"{output}: {len(too_long)} line(s) exceed {style.width} columns and would be "- f"rewrapped by the formatter, e.g.\n {too_long[0]}"- )--def render() -> dict[str, str]:# runpy.run_path loads the module by filesystem path, bypassing the import machinery and# therefore products/__init__.py and the Django settings behind it. Anything# model_catalog.py cannot satisfy from the standard library raises here, failing loudly.catalog = runpy.run_path(str(CATALOG_PY))- rendered = {}- for output, style in ((WEB_OUTPUT, OXFMT), (DESKTOP_OUTPUT, BIOME)):- text = render_catalog(catalog, style)- check_fits(text, style, output)- rendered[output] = text- return rendered+ rendered = render_catalog(catalog)+ return {WEB_OUTPUT: rendered, DESKTOP_OUTPUT: rendered}diff --git a/tools/hogli-commands/hogli_commands/projections.py b/tools/hogli-commands/hogli_commands/projections.pyindex 768a6fd929d5..c2e2b2e6548e 100644--- a/tools/hogli-commands/hogli_commands/projections.py+++ b/tools/hogli-commands/hogli_commands/projections.py@@ -13,16 +13,25 @@ fails on a ``*.generated.*`` file that no entry and no known pipeline produces.A renderer is a Python file with a ``render()`` function that returns the full text ofeach output, keyed by its repo-relative path. It never writes files and never parsesarguments; this module does both, so ``--check`` and the write path cannot disagree.++A renderer returns valid source and leaves the style to the formatter of the workspace+that owns the output: oxfmt at the repo root, Biome under ``products/desktop`` and+``packages/agent``. The runner formats every output before it compares or writes, so a+generated file looks like the code around it and no formatter needs an exemption for it."""from __future__ import annotationsimport sys+import jsonimport runpy+import tempfile+import subprocessfrom collections.abc import Callable, Iterablefrom dataclasses import dataclassfrom pathlib import Path+import yamlimport clickfrom hogli.manifest import REPO_ROOT@@ -83,19 +92,117 @@ PROJECTIONS: tuple[Projection, ...] = ()+@dataclass(frozen=True)+class Formatter:+ package: str+ binary: str+ workspace: str+ config: str+ lockfile: str+ # Arguments that make the formatter read stdin and print to stdout. The output path+ # follows them, so the formatter picks the parser and config rules for that file.+ stdin_args: tuple[str, ...]+++OXFMT = Formatter(+ package="oxfmt",+ binary="oxfmt",+ workspace=".",+ config=".oxfmtrc.json",+ lockfile="pnpm-lock.yaml",+ stdin_args=("--stdin-filepath",),+)+BIOME = Formatter(+ package="@biomejs/biome",+ binary="biome",+ workspace="products/desktop",+ config="products/desktop/biome.jsonc",+ lockfile="products/desktop/pnpm-lock.yaml",+ stdin_args=("format", "--stdin-file-path"),+)+AGENT_BIOME = Formatter(+ package="@biomejs/biome",+ binary="biome",+ workspace="packages/agent",+ config="packages/agent/biome.jsonc",+ lockfile="packages/agent/pnpm-lock.yaml",+ stdin_args=("format", "--stdin-file-path"),+)+FORMATTERS = (OXFMT, BIOME, AGENT_BIOME)+++def formatter_for(path: str) -> Formatter:+ for formatter in (BIOME, AGENT_BIOME):+ if path.startswith(f"{formatter.workspace}/"):+ return formatter+ return OXFMT++def all_triggers() -> tuple[str, ...]:- # The registry counts too: a changed entry can change what a projection writes.- return (REGISTRY, *(trigger for projection in PROJECTIONS for trigger in projection.triggers))+ # The registry and the formatter configs and lockfiles count too: each can change+ # what a projection writes.+ return (+ REGISTRY,+ *(path for formatter in FORMATTERS for path in (formatter.config, formatter.lockfile)),+ *(trigger for projection in PROJECTIONS for trigger in projection.triggers),+ )def all_outputs() -> tuple[str, ...]:return tuple(output for projection in PROJECTIONS for output in projection.outputs)+class OutputFormatter:+ """Runs rendered text through the formatter of the workspace that owns the output."""++ def __init__(self, repo_root: Path) -> None:+ self.repo_root = repo_root+ self._commands: dict[Formatter, list[str]] = {}+ # An empty npm project. Inside the repo, npm reads package.json, takes the formatter+ # as already installed and runs nothing.+ self._npm_prefix = tempfile.TemporaryDirectory()++ def _locked_version(self, formatter: Formatter) -> str:+ loader = getattr(yaml, "CSafeLoader", yaml.SafeLoader)+ lock = yaml.load((self.repo_root / formatter.lockfile).read_text(), Loader=loader)+ return lock["importers"]["."]["devDependencies"][formatter.package]["version"]++ def _command(self, formatter: Formatter) -> list[str]:+ # The installed copy when it matches the lockfile, so a local run stays offline.+ # CI's Python job has no node_modules, so it runs the locked version through npm.+ if formatter not in self._commands:+ version = self._locked_version(formatter)+ node_modules = self.repo_root / formatter.workspace / "node_modules"+ installed = node_modules / formatter.package / "package.json"+ if installed.exists() and json.loads(installed.read_text())["version"] == version:+ command = [str(node_modules / ".bin" / formatter.binary)]+ else:+ command = ["npm", "exec", "--yes", "--prefer-offline", f"--prefix={self._npm_prefix.name}"]+ command += [f"--package={formatter.package}@{version}", "--", formatter.binary]+ self._commands[formatter] = command+ return self._commands[formatter]++ def format(self, path: str, text: str) -> str:+ formatter = formatter_for(path)+ result = subprocess.run(+ [*self._command(formatter), *formatter.stdin_args, str(self.repo_root / path)],+ input=text,+ cwd=self.repo_root / formatter.workspace,+ capture_output=True,+ encoding="utf-8",+ timeout=300,+ check=False,+ )+ if result.returncode != 0:+ raise click.ClickException(f"{formatter.binary} could not format {path}:\n{result.stderr or result.stdout}")+ return result.stdout++class ProjectionRunner:- def __init__(self, repo_root: Path, projections: Iterable[Projection]) -> None:+ def __init__(self, repo_root: Path, projections: Iterable[Projection], formatter: OutputFormatter) -> None:self.repo_root = repo_rootself.projections = tuple(projections)+ self.formatter = formatterdef render(self, projection: Projection) -> dict[str, str]:# Ahead of site-packages, so a renderer that imports `posthog` reads this@@ -109,7 +216,7 @@ class ProjectionRunner:f"{projection.renderer} rendered {sorted(rendered)}, but the registry declares "f"{sorted(projection.outputs)} for '{projection.name}'. Keep the two in step.")- return rendered+ return {path: self.formatter.format(path, text) for path, text in rendered.items()}def stale(self, projection: Projection) -> list[str]:# Bytes, not text, so no newline translation can hide or invent a difference.@@ -122,9 +229,6 @@ class ProjectionRunner:if self._read(path) == contents.encode():continuetarget.parent.mkdir(parents=True, exist_ok=True)- # Nothing reformats these bytes. A renderer emits the shape its workspace- # formatter keeps, or the output sits in that formatter's ignore list, so the- # drift check cannot flap.target.write_bytes(contents.encode())written.append(path)return written@@ -148,7 +252,7 @@ def _select(only: tuple[str, ...]) -> tuple[Projection, ...]:@click.option("--only", multiple=True, metavar="NAME", help="Run only this projection. Repeat for several.")def cmd_build_projections(check: bool, only: tuple[str, ...]) -> None:"""Regenerate the checked-in projections of Python modules (no dev stack needed)."""- runner = ProjectionRunner(REPO_ROOT, _select(only))+ runner = ProjectionRunner(REPO_ROOT, _select(only), OutputFormatter(REPO_ROOT))if check:stale = [(projection, path) for projection in runner.projections for path in runner.stale(projection)]if not stale:diff --git a/tools/hogli-commands/hogli_commands/tests/test_projections.py b/tools/hogli-commands/hogli_commands/tests/test_projections.pyindex 79211adffbc6..defa07e4ed0e 100644--- a/tools/hogli-commands/hogli_commands/tests/test_projections.py+++ b/tools/hogli-commands/hogli_commands/tests/test_projections.py@@ -5,7 +5,7 @@ from pathlib import Pathimport pytestimport click-from hogli_commands.projections import Projection, ProjectionRunner+from hogli_commands.projections import OutputFormatter, Projection, ProjectionRunnerRENDERER = """def render():@@ -20,9 +20,24 @@ PROJECTION = Projection()-def _runner(tmp_path: Path, renderer: str = RENDERER, projection: Projection = PROJECTION) -> ProjectionRunner:+class UnchangedFormatter(OutputFormatter):+ def format(self, path: str, text: str) -> str:+ return text+++class MarkingFormatter(OutputFormatter):+ def format(self, path: str, text: str) -> str:+ return f"// formatted\n{text}"+++def _runner(+ tmp_path: Path,+ renderer: str = RENDERER,+ projection: Projection = PROJECTION,+ formatter: type[OutputFormatter] = UnchangedFormatter,+) -> ProjectionRunner:(tmp_path / projection.renderer).write_text(renderer)- return ProjectionRunner(tmp_path, [projection])+ return ProjectionRunner(tmp_path, [projection], formatter(tmp_path))class TestProjectionRunner:@@ -56,6 +71,17 @@ class TestProjectionRunner:assert runner.stale(PROJECTION) == []assert runner.write(PROJECTION) == []+ def test_formatted_output_is_what_gets_compared_and_written(self, tmp_path: Path) -> None:+ runner = _runner(tmp_path, formatter=MarkingFormatter)+ (tmp_path / "out").mkdir()+ (tmp_path / "out/first.generated.ts").write_text("first\n")+ (tmp_path / "out/second.json").write_text("// formatted\n{}")++ assert runner.stale(PROJECTION) == ["out/first.generated.ts"]++ runner.write(PROJECTION)+ assert (tmp_path / "out/first.generated.ts").read_text() == "// formatted\nfirst\n"+def test_renderer_outputs_must_match_the_registry(self, tmp_path: Path) -> None:undeclared = RENDERER.replace('"out/second.json": "{}"', '"out/other.json": "{}"')runner = _runner(tmp_path, renderer=undeclared)