From 88f343d5d67ccde56a1502e45a10d22cee0a092b Mon Sep 17 00:00:00 2001 From: a2a-platform Date: Fri, 12 Jun 2026 18:15:55 +0000 Subject: [PATCH] deploy --- .a2a/agent.dsl.json | 4745 +++++++++++++++++++++++++++++++++++++++++++ a2a.yaml | 4 +- agent.py | 130 ++ 3 files changed, 4878 insertions(+), 1 deletion(-) create mode 100644 .a2a/agent.dsl.json diff --git a/.a2a/agent.dsl.json b/.a2a/agent.dsl.json new file mode 100644 index 0000000..486f507 --- /dev/null +++ b/.a2a/agent.dsl.json @@ -0,0 +1,4745 @@ +{ + "schema_version": "2026-06-04", + "language": "python", + "name": "openpannel", + "description": "OpenPanel analytics agent for the A2A Cloud OpenPanel deployment. Includes manage/admin operations and project analytics operations from the OpenPanel OpenAPI specs.", + "version": "1.0.0", + "entrypoint": { + "module": "agent", + "class_name": "Openpannel", + "function": null, + "command": [] + }, + "skills": [ + { + "name": "auto", + "description": "Use the OpenAPI service to complete a natural-language goal.", + "handler": "auto", + "tags": [ + "openapi", + "auto" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 180.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "goal": { + "type": "string" + } + }, + "required": [ + "goal" + ], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_manage_projects", + "description": "GET /manage/projects - List all projects for the organization.", + "handler": "get_manage_projects", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "post_manage_projects", + "description": "POST /manage/projects - Create a new project and its first write client.", + "handler": "post_manage_projects", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_manage_projects_id", + "description": "GET /manage/projects/{id} - Get a single project by ID.", + "handler": "get_manage_projects_id", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "patch_manage_projects_id", + "description": "PATCH /manage/projects/{id} - Update project settings (name, domain, CORS, tracking options).", + "handler": "patch_manage_projects_id", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "delete_manage_projects_id", + "description": "DELETE /manage/projects/{id} - Soft-delete a project (scheduled for removal in 24 hours).", + "handler": "delete_manage_projects_id", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_manage_clients", + "description": "GET /manage/clients - List all API clients for the organization, optionally filtered by project.", + "handler": "get_manage_clients", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "post_manage_clients", + "description": "POST /manage/clients - Create a new API client (read, write, or root type) and return its generated secret.", + "handler": "post_manage_clients", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_manage_clients_id", + "description": "GET /manage/clients/{id} - Get a single API client by ID.", + "handler": "get_manage_clients_id", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "patch_manage_clients_id", + "description": "PATCH /manage/clients/{id} - Update an API client name.", + "handler": "patch_manage_clients_id", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "delete_manage_clients_id", + "description": "DELETE /manage/clients/{id} - Delete an API client.", + "handler": "delete_manage_clients_id", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_manage_references", + "description": "GET /manage/references - List annotation references for a project.", + "handler": "get_manage_references", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "post_manage_references", + "description": "POST /manage/references - post_/manage/references", + "handler": "post_manage_references", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_manage_references_id", + "description": "GET /manage/references/{id} - Get a single annotation reference by ID.", + "handler": "get_manage_references_id", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "patch_manage_references_id", + "description": "PATCH /manage/references/{id} - patch_/manage/references/{id}", + "handler": "patch_manage_references_id", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "delete_manage_references_id", + "description": "DELETE /manage/references/{id} - delete_/manage/references/{id}", + "handler": "delete_manage_references_id", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_manage_projects_project_id_dashboards", + "description": "GET /manage/projects/{projectId}/dashboards - List all dashboards for a project.", + "handler": "get_manage_projects_project_id_dashboards", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_manage_projects_project_id_dashboards_dashboard_id_reports", + "description": "GET /manage/projects/{projectId}/dashboards/{dashboardId}/reports - List all reports in a dashboard.", + "handler": "get_manage_projects_project_id_dashboards_dashboard_id_reports", + "tags": [ + "Manage" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "post_event", + "description": "POST /event/ - Deprecated direct event ingestion endpoint. Use /track instead.", + "handler": "post_event", + "tags": [ + "Event" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "post_profile", + "description": "POST /profile/ - Identify or update a user profile.", + "handler": "post_profile", + "tags": [ + "Profile" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "post_profile_increment", + "description": "POST /profile/increment - Increment a numeric property on a user profile.", + "handler": "post_profile_increment", + "tags": [ + "Profile" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "post_profile_decrement", + "description": "POST /profile/decrement - Decrement a numeric property on a user profile.", + "handler": "post_profile_decrement", + "tags": [ + "Profile" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_export_events", + "description": "GET /export/events - Export a paginated list of raw events with optional filtering by date, profile, and event type.", + "handler": "get_export_events", + "tags": [ + "Export" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_export_charts", + "description": "GET /export/charts - Export aggregated chart/analytics data for a series of events over a time range.", + "handler": "get_export_charts", + "tags": [ + "Export" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "post_import_events", + "description": "POST /import/events - Bulk import historical events.", + "handler": "post_import_events", + "tags": [ + "Import" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_overview", + "description": "GET /insights/{projectId}/overview - Get an overview of key metrics for the project (sessions, pageviews, bounce rate, duration).", + "handler": "get_insights_project_id_overview", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_active_users", + "description": "GET /insights/{projectId}/active_users - Get rolling active user counts over the last N days.", + "handler": "get_insights_project_id_active_users", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_retention", + "description": "GET /insights/{projectId}/retention - Get weekly retention series data.", + "handler": "get_insights_project_id_retention", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_retention_cohort", + "description": "GET /insights/{projectId}/retention/cohort - Get retention cohort data.", + "handler": "get_insights_project_id_retention_cohort", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_pages_top", + "description": "GET /insights/{projectId}/pages/top - Get the top pages by pageviews for the given date range.", + "handler": "get_insights_project_id_pages_top", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_pages_entry_exit", + "description": "GET /insights/{projectId}/pages/entry_exit - Get entry or exit pages ranked by session count.", + "handler": "get_insights_project_id_pages_entry_exit", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_pages_performance", + "description": "GET /insights/{projectId}/pages/performance - Get page-level performance metrics (bounce rate, avg duration, sessions).", + "handler": "get_insights_project_id_pages_performance", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_metrics", + "description": "GET /insights/{projectId}/metrics - Get aggregated website metrics including sessions, pageviews, and bounce rate.", + "handler": "get_insights_project_id_metrics", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_live", + "description": "GET /insights/{projectId}/live - Get the current number of live (active) visitors.", + "handler": "get_insights_project_id_live", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_pages", + "description": "GET /insights/{projectId}/pages - Get top pages with pageview counts for the selected date range.", + "handler": "get_insights_project_id_pages", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_referrer", + "description": "GET /insights/{projectId}/referrer - Get top values for the \"referrer\" dimension.", + "handler": "get_insights_project_id_referrer", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_referrer_name", + "description": "GET /insights/{projectId}/referrer_name - Get top values for the \"referrer_name\" dimension.", + "handler": "get_insights_project_id_referrer_name", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_referrer_type", + "description": "GET /insights/{projectId}/referrer_type - Get top values for the \"referrer_type\" dimension.", + "handler": "get_insights_project_id_referrer_type", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_utm_source", + "description": "GET /insights/{projectId}/utm_source - Get top values for the \"utm_source\" dimension.", + "handler": "get_insights_project_id_utm_source", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_utm_medium", + "description": "GET /insights/{projectId}/utm_medium - Get top values for the \"utm_medium\" dimension.", + "handler": "get_insights_project_id_utm_medium", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_utm_campaign", + "description": "GET /insights/{projectId}/utm_campaign - Get top values for the \"utm_campaign\" dimension.", + "handler": "get_insights_project_id_utm_campaign", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_utm_term", + "description": "GET /insights/{projectId}/utm_term - Get top values for the \"utm_term\" dimension.", + "handler": "get_insights_project_id_utm_term", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_utm_content", + "description": "GET /insights/{projectId}/utm_content - Get top values for the \"utm_content\" dimension.", + "handler": "get_insights_project_id_utm_content", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_region", + "description": "GET /insights/{projectId}/region - Get top values for the \"region\" dimension.", + "handler": "get_insights_project_id_region", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_country", + "description": "GET /insights/{projectId}/country - Get top values for the \"country\" dimension.", + "handler": "get_insights_project_id_country", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_city", + "description": "GET /insights/{projectId}/city - Get top values for the \"city\" dimension.", + "handler": "get_insights_project_id_city", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_device", + "description": "GET /insights/{projectId}/device - Get top values for the \"device\" dimension.", + "handler": "get_insights_project_id_device", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_brand", + "description": "GET /insights/{projectId}/brand - Get top values for the \"brand\" dimension.", + "handler": "get_insights_project_id_brand", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_model", + "description": "GET /insights/{projectId}/model - Get top values for the \"model\" dimension.", + "handler": "get_insights_project_id_model", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_browser", + "description": "GET /insights/{projectId}/browser - Get top values for the \"browser\" dimension.", + "handler": "get_insights_project_id_browser", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_browser_version", + "description": "GET /insights/{projectId}/browser_version - Get top values for the \"browser_version\" dimension.", + "handler": "get_insights_project_id_browser_version", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_os", + "description": "GET /insights/{projectId}/os - Get top values for the \"os\" dimension.", + "handler": "get_insights_project_id_os", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_os_version", + "description": "GET /insights/{projectId}/os_version - Get top values for the \"os_version\" dimension.", + "handler": "get_insights_project_id_os_version", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_funnel", + "description": "GET /insights/{projectId}/funnel - Get funnel conversion rates for a sequence of events.", + "handler": "get_insights_project_id_funnel", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_traffic_referrers", + "description": "GET /insights/{projectId}/traffic/referrers - Get traffic breakdown by referrer source.", + "handler": "get_insights_project_id_traffic_referrers", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_traffic_geo", + "description": "GET /insights/{projectId}/traffic/geo - Get traffic breakdown by geographic dimension (country, region, city).", + "handler": "get_insights_project_id_traffic_geo", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_traffic_devices", + "description": "GET /insights/{projectId}/traffic/devices - Get traffic breakdown by device type, browser, or OS.", + "handler": "get_insights_project_id_traffic_devices", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_user_flow", + "description": "GET /insights/{projectId}/user_flow - Get user flow paths before, after, or between specified events.", + "handler": "get_insights_project_id_user_flow", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_engagement", + "description": "GET /insights/{projectId}/engagement - Get engagement metrics for the project.", + "handler": "get_insights_project_id_engagement", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_events", + "description": "GET /insights/{projectId}/events - Query events with optional filters for date range, profile, and properties.", + "handler": "get_insights_project_id_events", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_events_names", + "description": "GET /insights/{projectId}/events/names - List all distinct event names tracked in the project.", + "handler": "get_insights_project_id_events_names", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_events_properties", + "description": "GET /insights/{projectId}/events/properties - List all property keys for a given event name.", + "handler": "get_insights_project_id_events_properties", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_events_property_values", + "description": "GET /insights/{projectId}/events/property_values - Get the top values for a specific event property key.", + "handler": "get_insights_project_id_events_property_values", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_profiles", + "description": "GET /insights/{projectId}/profiles - Search and filter user profiles.", + "handler": "get_insights_project_id_profiles", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_profiles_profile_id", + "description": "GET /insights/{projectId}/profiles/{profileId} - Get a single user profile with their recent events.", + "handler": "get_insights_project_id_profiles_profile_id", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_profiles_profile_id_sessions", + "description": "GET /insights/{projectId}/profiles/{profileId}/sessions - Get sessions for a specific user profile.", + "handler": "get_insights_project_id_profiles_profile_id_sessions", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_profiles_profile_id_metrics", + "description": "GET /insights/{projectId}/profiles/{profileId}/metrics - Get aggregated metrics for a specific user profile.", + "handler": "get_insights_project_id_profiles_profile_id_metrics", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_sessions", + "description": "GET /insights/{projectId}/sessions - Query sessions with optional filters.", + "handler": "get_insights_project_id_sessions", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_groups_types", + "description": "GET /insights/{projectId}/groups/types - List all group types defined in the project.", + "handler": "get_insights_project_id_groups_types", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_groups", + "description": "GET /insights/{projectId}/groups - Search and filter groups.", + "handler": "get_insights_project_id_groups", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_groups_group_id", + "description": "GET /insights/{projectId}/groups/{groupId} - Get a single group with its members.", + "handler": "get_insights_project_id_groups_group_id", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_reports_report_id_data", + "description": "GET /insights/{projectId}/reports/{reportId}/data - Get the data for a saved report.", + "handler": "get_insights_project_id_reports_report_id_data", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_gsc_overview", + "description": "GET /insights/{projectId}/gsc/overview - Get a Google Search Console performance overview (clicks, impressions, CTR, position).", + "handler": "get_insights_project_id_gsc_overview", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_gsc_pages", + "description": "GET /insights/{projectId}/gsc/pages - Get top pages from Google Search Console.", + "handler": "get_insights_project_id_gsc_pages", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_gsc_pages_details", + "description": "GET /insights/{projectId}/gsc/pages/details - Get detailed GSC metrics for a specific page URL.", + "handler": "get_insights_project_id_gsc_pages_details", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_gsc_queries", + "description": "GET /insights/{projectId}/gsc/queries - Get top search queries from Google Search Console.", + "handler": "get_insights_project_id_gsc_queries", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_gsc_queries_details", + "description": "GET /insights/{projectId}/gsc/queries/details - Get detailed GSC metrics for a specific search query.", + "handler": "get_insights_project_id_gsc_queries_details", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_gsc_queries_opportunities", + "description": "GET /insights/{projectId}/gsc/queries/opportunities - Get GSC query opportunities (high impressions, low CTR).", + "handler": "get_insights_project_id_gsc_queries_opportunities", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_insights_project_id_gsc_cannibalization", + "description": "GET /insights/{projectId}/gsc/cannibalization - Detect keyword cannibalization across pages in Google Search Console.", + "handler": "get_insights_project_id_gsc_cannibalization", + "tags": [ + "Insights" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "post_track", + "description": "POST /track/ - Ingest a tracking event (track, identify, group, increment, decrement, replay).", + "handler": "post_track", + "tags": [ + "Track" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_track_device_id", + "description": "GET /track/device-id - Get or generate a stable device ID and session ID for the current visitor.", + "handler": "get_track_device_id", + "tags": [ + "Track" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 60.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "body": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": [], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + }, + { + "name": "get_project_geo_from_events", + "description": "Summarize OpenPanel visitor geography from raw exported events. Use this instead of the stale /insights/{projectId}/traffic/geo route.", + "handler": "get_project_geo_from_events", + "tags": [ + "Insights", + "Geo" + ], + "scopes": [], + "stream": false, + "policy": { + "timeout_seconds": 120.0, + "idempotent": false, + "max_retries": 0, + "cost_class": null, + "allow_scope_expansion": false, + "grant_mode": null, + "grant_allow_patterns": [], + "grant_deny_patterns": [], + "grant_outputs_prefix": null, + "grant_write_prefixes": [], + "grant_ttl_seconds": null, + "grant_run_timeout_seconds": null, + "grant_approval_timeout_seconds": null, + "grant_scope_approval_timeout_seconds": null + }, + "input_schema": { + "type": "object", + "properties": { + "projectId": { + "type": "string" + }, + "start": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "end": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "range": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "max_pages": { + "type": "integer" + } + }, + "required": [ + "projectId" + ], + "additionalProperties": false + }, + "output_schema": { + "additionalProperties": true, + "type": "object" + } + } + ], + "capabilities": { + "openapi_auto_agent": { + "operation_count": 80, + "default_base_url": "https://analytics.a2acloud.io/api", + "source_openapi_url": null, + "source_openapi_urls": [ + "https://analytics.a2acloud.io/api/documentation/admin.json", + "https://analytics.a2acloud.io/api/documentation/project.json" + ], + "server_urls": [ + "https://analytics.a2acloud.io/api" + ], + "regenerable": true, + "security_schemes": [ + "analytics_a2acloud_io_api_documentation_admin_json__openpanel_client_id", + "analytics_a2acloud_io_api_documentation_admin_json__openpanel_client_secret", + "analytics_a2acloud_io_api_documentation_project_json__openpanel_client_id", + "analytics_a2acloud_io_api_documentation_project_json__openpanel_client_secret" + ] + } + }, + "input_modes": [ + "application/json" + ], + "output_modes": [ + "application/json" + ], + "required_secrets": [], + "required_env": [], + "consumer_setup": { + "fields": [ + { + "name": "OPENAPI_BASE_URL", + "kind": "config", + "label": "API base URL", + "description": "Override the default API server (https://analytics.a2acloud.io/api).", + "required": false, + "input_type": "url", + "options": [] + }, + { + "name": "OPENPANEL_CLIENT_ID", + "kind": "secret", + "label": "OpenPanel client ID", + "description": "OpenAPI sources: https://analytics.a2acloud.io/api/documentation/admin.json; https://analytics.a2acloud.io/api/documentation/project.json. OpenPanel API client ID. Use a root client for manage/admin operations and a project client for project API operations.", + "required": true, + "input_type": "password", + "options": [] + }, + { + "name": "OPENPANEL_CLIENT_SECRET", + "kind": "secret", + "label": "OpenPanel client secret", + "description": "OpenAPI sources: https://analytics.a2acloud.io/api/documentation/admin.json; https://analytics.a2acloud.io/api/documentation/project.json. OpenPanel API client secret. Requests send it in the `openpanel-client-secret` header.", + "required": true, + "input_type": "password", + "options": [] + } + ] + }, + "runtime": { + "lifecycle": "ephemeral", + "availability": "on_demand", + "state": "none", + "sandbox": "microsandbox", + "resources": { + "cpu": "200m", + "memory": "512Mi", + "gpu": 0, + "max_runtime_seconds": 600 + }, + "concurrency": 1, + "egress": { + "allow_hosts": [ + "analytics.a2acloud.io" + ], + "allow_internal_services": [], + "deny_internet_by_default": true + }, + "tools_used": [ + "openapi", + "deepagents" + ], + "llm_provisioning": "platform", + "pricing": { + "price_per_call_usd": 0.0, + "caller_pays_llm": false, + "notes": "Uses a scoped platform LLM grant through ctx.llm." + }, + "wants_cp_jwt": false, + "platform_resources": { + "memory": null, + "databases": [] + }, + "apt_packages": [] + }, + "template_lineage": null, + "meta_agent_manifest": null, + "state_schema": null, + "workspace_access": { + "enabled": false, + "max_files": 0, + "allowed_modes": [], + "require_reason": true, + "deny_patterns": [], + "require_human_approval": false, + "max_total_size_bytes": 104857600 + }, + "config_schema": { + "description": "Default config model when an agent declares no config.", + "properties": {}, + "title": "_EmptyConfig", + "type": "object" + }, + "auth": { + "model": "a2a_pack.auth.NoAuth", + "strategy": "public", + "principal_schema": { + "additionalProperties": false, + "description": "Public agent: no caller identity required.", + "properties": {}, + "title": "NoAuth", + "type": "object" + }, + "resolver": null, + "required": false + }, + "metadata": { + "source": "python-a2a-pack", + "project_manifest": { + "name": "openpannel", + "version": "1.0.0", + "entrypoint": "agent:Openpannel" + } + } +} diff --git a/a2a.yaml b/a2a.yaml index 7bb9658..99e6ed6 100644 --- a/a2a.yaml +++ b/a2a.yaml @@ -1,7 +1,9 @@ name: openpannel version: 1.0.0 entrypoint: agent:Openpannel -description: Composite OpenAPI agent generated from 2 OpenAPI specs. +description: OpenPanel analytics agent for the A2A Cloud OpenPanel deployment. Includes + manage/admin operations and project analytics operations from the OpenPanel OpenAPI + specs. runtime: resources: cpu: 200m diff --git a/agent.py b/agent.py index 118f1a3..d05d21b 100644 --- a/agent.py +++ b/agent.py @@ -1,6 +1,7 @@ from __future__ import annotations import base64 +import builtins import json import re from typing import Any @@ -1625,6 +1626,135 @@ class Openpannel(A2AAgent): body=body, ) + @skill( + name="get_project_geo_from_events", + description=( + "Summarize OpenPanel visitor geography from raw exported events. " + "Use this instead of the stale /insights/{projectId}/traffic/geo route." + ), + tags=("Insights", "Geo"), + timeout_seconds=120, + ) + async def get_project_geo_from_events( + self, + ctx: RunContext, + projectId: str, + start: str | None = None, + end: str | None = None, + range: str = "today", + limit: int = 250, + max_pages: int = 4, + ) -> dict[str, Any]: + per_page = max(1, min(int(limit), 1000)) + pages = max(1, min(int(max_pages), 10)) + aggregate: dict[str, dict[str, Any]] = {} + samples: list[dict[str, Any]] = [] + total_events = 0 + + for page in builtins.range(1, pages + 1): + params: dict[str, Any] = { + "projectId": projectId, + "page": page, + "limit": per_page, + } + if start or end: + if start: + params["start"] = start + if end: + params["end"] = end + else: + params["range"] = range + + response = await self._request( + ctx, + "get_export_events", + parameters=params, + body=None, + ) + if not response.get("ok"): + return response + + result = response.get("result") if isinstance(response, dict) else None + data = result.get("data", []) if isinstance(result, dict) else [] + meta = result.get("meta", {}) if isinstance(result, dict) else {} + if not isinstance(data, list) or not data: + break + + total_events += len(data) + for event in data: + if not isinstance(event, dict): + continue + country = self._clean_geo_value(event.get("country")) + region = self._clean_geo_value(event.get("region")) + city = self._clean_geo_value(event.get("city")) + key = "|".join([country, region, city]) + bucket = aggregate.setdefault( + key, + { + "country": country or None, + "region": region or None, + "city": city or None, + "events": 0, + "sessions": set(), + "latest": None, + }, + ) + bucket["events"] += 1 + session_id = event.get("sessionId") or event.get("session_id") + if session_id: + bucket["sessions"].add(str(session_id)) + created_at = event.get("createdAt") or event.get("created_at") + if created_at and (bucket["latest"] is None or str(created_at) > str(bucket["latest"])): + bucket["latest"] = created_at + if len(samples) < 10: + samples.append( + { + "createdAt": created_at, + "name": event.get("name"), + "path": event.get("path"), + "country": country or None, + "region": region or None, + "city": city or None, + "browser": event.get("browser"), + "os": event.get("os"), + } + ) + + if isinstance(meta, dict): + current = int(meta.get("current") or page) + page_count = int(meta.get("pages") or page) + if current >= page_count: + break + + rows = [] + for bucket in aggregate.values(): + rows.append( + { + "country": bucket["country"], + "region": bucket["region"], + "city": bucket["city"], + "events": bucket["events"], + "sessions": len(bucket["sessions"]), + "latest": bucket["latest"], + } + ) + rows.sort(key=lambda row: (row["latest"] or "", row["events"]), reverse=True) + + return { + "ok": True, + "operation_id": "get_project_geo_from_events", + "projectId": projectId, + "range": {"start": start, "end": end, "range": range}, + "events_scanned": total_events, + "geo": rows, + "sample_events": samples, + } + + @staticmethod + def _clean_geo_value(value: Any) -> str: + text = str(value or "").replace("\x00", "").strip() + return text + def _operation_tools(self, ctx: RunContext) -> list[StructuredTool]: tools: list[StructuredTool] = [] for operation_id, operation in OPERATIONS.items():