From 1f8bf1ba006c1c5a186bfa9814705e83117e9d8c Mon Sep 17 00:00:00 2001 From: Pedro Rodrigues Date: Mon, 20 Apr 2026 12:44:16 +0100 Subject: [PATCH 1/3] chore: ignore .worktrees directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b8de4f3b..a42d6f89 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ dist/ .temp/ .DS_Store .env* +.worktrees/ From 75ed613b6747a680fd28479b891d6d680a608beb Mon Sep 17 00:00:00 2001 From: Pedro Rodrigues Date: Mon, 29 Jun 2026 16:09:26 -0700 Subject: [PATCH 2/3] docs: add AGENTS.md with CLAUDE.md symlink Co-Authored-By: Claude Opus 4.8 (1M context) --- AGENTS.md | 3 +++ CLAUDE.md | 1 + 2 files changed, 4 insertions(+) create mode 100644 AGENTS.md create mode 120000 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..462f0400 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,3 @@ +## Contributing + +Before opening an issue or pull request, read `CONTRIBUTING.md` and follow its guidance. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 00000000..47dc3e3d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file From 43cd01eba92ff35835d48edb3f7021fc9f84bee9 Mon Sep 17 00:00:00 2001 From: Pedro Rodrigues Date: Mon, 29 Jun 2026 16:18:47 -0700 Subject: [PATCH 3/3] chore: regenerate management API types Regenerate from the live Supabase Management API OpenAPI spec to fix the stale types.ts that was failing the `check` CI job. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/management-api/types.ts | 476 +++++++++++++++++- 1 file changed, 461 insertions(+), 15 deletions(-) diff --git a/packages/mcp-server-supabase/src/management-api/types.ts b/packages/mcp-server-supabase/src/management-api/types.ts index d6f71113..e0728b94 100644 --- a/packages/mcp-server-supabase/src/management-api/types.ts +++ b/packages/mcp-server-supabase/src/management-api/types.ts @@ -1111,6 +1111,23 @@ export interface paths { patch?: never; trace?: never; }; + "/v1/projects/{ref}/restart": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Restarts the given project */ + post: operations["v1-restart-a-project"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/v1/projects/{ref}/restore": { parameters: { query?: never; @@ -1260,6 +1277,7 @@ export interface paths { }; /** * Gets project's logs + * @deprecated * @description Executes a SQL query on the project's logs. * * Either the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided. @@ -1269,6 +1287,35 @@ export interface paths { * Note: Unless the `sql` parameter is provided, only edge_logs will be queried. See the [log query docs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer:~:text=logs%20from%20the-,Sources,-drop%2Ddown%3A) for all available sources. * */ + get: operations["v1-get-project-logs-all"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v1/projects/{ref}/analytics/endpoints/logs": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Gets all project's logs in a single log stream + * @description Executes an SQL or LQL query on the project's unified logs stream. + * + * Either the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided. + * If both are not provided, only the last 1 minute of logs will be queried. + * The timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown. + * + * Filter by the `source` column to specify specific log sources, such as edge_logs, postgres_logs, etc. + * + * Note: SQL must be written in **ClickHouse SQL dialect**. + * + */ get: operations["v1-get-project-logs"]; put?: never; post?: never; @@ -1543,6 +1590,66 @@ export interface paths { patch?: never; trace?: never; }; + "/v1/projects/{ref}/database/jit/invite": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Invites an external user to a database for JIT access + * @description Invites the external user and sets initial roles that can be assumed and for how long + */ + post: operations["v1-invite-external-jit-access"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v1/projects/{ref}/database/jit/invite/accept": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Accepts invitation for JIT database access + * @description Accepts the invitation to JIT database access + */ + post: operations["v1-accept-invite-external-jit-access"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v1/projects/{ref}/database/jit/invite/{invite_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Deletes the invite for an external user to a database for JIT access + * @description Revokes and deletes the invitation + */ + delete: operations["v1-delete-invite-external-jit-access"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/v1/projects/{ref}/database/jit/{user_id}": { parameters: { query?: never; @@ -2296,6 +2403,8 @@ export interface components { * @description Template URL used to create the project from the CLI. */ template_url?: string; + /** @description [Experimental] Whether to enable high availability for the project. */ + high_availability?: boolean; }; V1ProjectResponse: { /** @@ -2686,7 +2795,7 @@ export interface components { /** @enum {string} */ state: "unavailable"; /** @enum {string} */ - unavailableReason: "manual_migration_required" | "postgres_upgrade_required" | "temporarily_unavailable"; + unavailableReason: "postgres_upgrade_required" | "temporarily_unavailable"; }; /** @example { * "state": "enabled" @@ -3008,10 +3117,16 @@ export interface components { /** @enum {string} */ type: "project_hibernating"; })[]; - warnings: { + warnings: ({ /** @enum {string} */ type: "pg_graphql_introspection_change"; - }[]; + } | { + /** @enum {string} */ + type: "ltree_reindex_required"; + } | { + /** @enum {string} */ + type: "operator_estimator_gate"; + })[]; }; DatabaseUpgradeStatusResponse: { databaseUpgradeStatus: { @@ -3713,9 +3828,9 @@ export interface components { ListProjectAddonsResponse: { selected_addons: { /** @enum {string} */ - type: "custom_domain" | "compute_instance" | "pitr" | "ipv4" | "auth_mfa_phone" | "auth_mfa_web_authn" | "log_drain"; + type: "custom_domain" | "compute_instance" | "pitr" | "ipv4" | "auth_mfa_phone" | "auth_mfa_web_authn" | "log_drain" | "etl_pipeline"; variant: { - id: ("ci_micro" | "ci_small" | "ci_medium" | "ci_large" | "ci_xlarge" | "ci_2xlarge" | "ci_4xlarge" | "ci_8xlarge" | "ci_12xlarge" | "ci_16xlarge" | "ci_24xlarge" | "ci_24xlarge_optimized_cpu" | "ci_24xlarge_optimized_memory" | "ci_24xlarge_high_memory" | "ci_48xlarge" | "ci_48xlarge_optimized_cpu" | "ci_48xlarge_optimized_memory" | "ci_48xlarge_high_memory") | "cd_default" | ("pitr_7" | "pitr_14" | "pitr_28") | "ipv4_default" | "auth_mfa_phone_default" | "auth_mfa_web_authn_default" | "log_drain_default"; + id: ("ci_micro" | "ci_small" | "ci_medium" | "ci_large" | "ci_xlarge" | "ci_2xlarge" | "ci_4xlarge" | "ci_8xlarge" | "ci_12xlarge" | "ci_16xlarge" | "ci_24xlarge" | "ci_24xlarge_optimized_cpu" | "ci_24xlarge_optimized_memory" | "ci_24xlarge_high_memory" | "ci_48xlarge" | "ci_48xlarge_optimized_cpu" | "ci_48xlarge_optimized_memory" | "ci_48xlarge_high_memory") | "cd_default" | ("pitr_7" | "pitr_14" | "pitr_28") | "ipv4_default" | "auth_mfa_phone_default" | "auth_mfa_web_authn_default" | "log_drain_default" | "etl_pipeline_default"; name: string; price: { description: string; @@ -3731,10 +3846,10 @@ export interface components { }[]; available_addons: { /** @enum {string} */ - type: "custom_domain" | "compute_instance" | "pitr" | "ipv4" | "auth_mfa_phone" | "auth_mfa_web_authn" | "log_drain"; + type: "custom_domain" | "compute_instance" | "pitr" | "ipv4" | "auth_mfa_phone" | "auth_mfa_web_authn" | "log_drain" | "etl_pipeline"; name: string; variants: { - id: ("ci_micro" | "ci_small" | "ci_medium" | "ci_large" | "ci_xlarge" | "ci_2xlarge" | "ci_4xlarge" | "ci_8xlarge" | "ci_12xlarge" | "ci_16xlarge" | "ci_24xlarge" | "ci_24xlarge_optimized_cpu" | "ci_24xlarge_optimized_memory" | "ci_24xlarge_high_memory" | "ci_48xlarge" | "ci_48xlarge_optimized_cpu" | "ci_48xlarge_optimized_memory" | "ci_48xlarge_high_memory") | "cd_default" | ("pitr_7" | "pitr_14" | "pitr_28") | "ipv4_default" | "auth_mfa_phone_default" | "auth_mfa_web_authn_default" | "log_drain_default"; + id: ("ci_micro" | "ci_small" | "ci_medium" | "ci_large" | "ci_xlarge" | "ci_2xlarge" | "ci_4xlarge" | "ci_8xlarge" | "ci_12xlarge" | "ci_16xlarge" | "ci_24xlarge" | "ci_24xlarge_optimized_cpu" | "ci_24xlarge_optimized_memory" | "ci_24xlarge_high_memory" | "ci_48xlarge" | "ci_48xlarge_optimized_cpu" | "ci_48xlarge_optimized_memory" | "ci_48xlarge_high_memory") | "cd_default" | ("pitr_7" | "pitr_14" | "pitr_28") | "ipv4_default" | "auth_mfa_phone_default" | "auth_mfa_web_authn_default" | "log_drain_default" | "etl_pipeline_default"; name: string; price: { description: string; @@ -3756,7 +3871,7 @@ export interface components { ApplyProjectAddonBody: { addon_variant: ("ci_micro" | "ci_small" | "ci_medium" | "ci_large" | "ci_xlarge" | "ci_2xlarge" | "ci_4xlarge" | "ci_8xlarge" | "ci_12xlarge" | "ci_16xlarge" | "ci_24xlarge" | "ci_24xlarge_optimized_cpu" | "ci_24xlarge_optimized_memory" | "ci_24xlarge_high_memory" | "ci_48xlarge" | "ci_48xlarge_optimized_cpu" | "ci_48xlarge_optimized_memory" | "ci_48xlarge_high_memory") | "cd_default" | ("pitr_7" | "pitr_14" | "pitr_28") | "ipv4_default"; /** @enum {string} */ - addon_type: "custom_domain" | "compute_instance" | "pitr" | "ipv4" | "auth_mfa_phone" | "auth_mfa_web_authn" | "log_drain"; + addon_type: "custom_domain" | "compute_instance" | "pitr" | "ipv4" | "auth_mfa_phone" | "auth_mfa_web_authn" | "log_drain" | "etl_pipeline"; }; ProjectClaimTokenResponse: { token_alias: string; @@ -3947,7 +4062,7 @@ export interface components { }; JitAccessResponse: { /** Format: uuid */ - user_id: string; + user_id?: string; user_roles: { role: string; expires_at?: number; @@ -3988,9 +4103,12 @@ export interface components { }; }; JitListAccessResponse: { - items: { + items: ({ /** Format: uuid */ user_id: string; + primary_email: string | null; + invite_id: null; + expires_at: null; user_roles: { role: string; expires_at?: number; @@ -4004,7 +4122,26 @@ export interface components { }; branches_only?: boolean; }[]; - }[]; + } | { + user_id: null; + primary_email: string; + /** Format: uuid */ + invite_id: string; + expires_at: string; + user_roles: { + role: string; + expires_at?: number; + allowed_networks?: { + allowed_cidrs?: { + cidr: string; + }[]; + allowed_cidrs_v6?: { + cidr: string; + }[]; + }; + branches_only?: boolean; + }[]; + })[]; }; /** @example { * "user_id": "55555555-5555-4555-8555-555555555555", @@ -4040,6 +4177,68 @@ export interface components { branches_only?: boolean; }[]; }; + /** @example { + * "email": "external-user@somedomain.xyz", + * "roles": [ + * { + * "role": "postgres", + * "expires_at": 1740787200, + * "allowed_networks": { + * "allowed_cidrs": [ + * { + * "cidr": "203.0.113.0/24" + * } + * ] + * }, + * "branches_only": false + * } + * ] + * } */ + InviteExternalUserJitAccessBody: { + /** Format: email */ + email: string; + roles: { + role: string; + expires_at?: number; + allowed_networks?: { + allowed_cidrs?: { + cidr: string; + }[]; + allowed_cidrs_v6?: { + cidr: string; + }[]; + }; + branches_only?: boolean; + }[]; + }; + InviteExternalUserJitResponse: { + /** Format: email */ + email: string; + /** Format: uuid */ + invite_id: string; + user_roles: { + role: string; + expires_at?: number; + allowed_networks?: { + allowed_cidrs?: { + cidr: string; + }[]; + allowed_cidrs_v6?: { + cidr: string; + }[]; + }; + branches_only?: boolean; + }[]; + }; + /** @example { + * "email": "external-user@somedomain.xyz", + * "token": "" + * } */ + AcceptInviteExternalUserJitAccessBody: { + /** Format: email */ + email: string; + token: string; + }; FunctionResponse: { id: string; slug: string; @@ -4250,6 +4449,9 @@ export interface components { s3Protocol: { enabled: boolean; }; + purgeCache: { + enabled: boolean; + }; icebergCatalog: { enabled: boolean; maxNamespaces: number; @@ -4291,6 +4493,9 @@ export interface components { s3Protocol?: { enabled: boolean; }; + purgeCache?: { + enabled: boolean; + }; icebergCatalog?: { enabled: boolean; maxNamespaces: number; @@ -4789,7 +4994,7 @@ export interface components { entitlements: { feature: { /** @enum {string} */ - key: "instances.compute_update_available_sizes" | "instances.read_replicas" | "instances.disk_modifications" | "instances.high_availability" | "instances.orioledb" | "replication.etl" | "storage.max_file_size" | "storage.max_file_size.configurable" | "storage.image_transformations" | "storage.vector_buckets" | "storage.iceberg_catalog" | "security.audit_logs_days" | "security.questionnaire" | "security.soc2_report" | "security.iso27001_certificate" | "security.private_link" | "security.enforce_mfa" | "log.retention_days" | "custom_domain" | "vanity_subdomain" | "ipv4" | "pitr.available_variants" | "log_drains" | "audit_log_drains" | "branching_limit" | "branching_persistent" | "auth.mfa_phone" | "auth.mfa_web_authn" | "auth.mfa_enhanced_security" | "auth.hooks" | "auth.platform.sso" | "auth.custom_jwt_template" | "auth.saml_2" | "auth.user_sessions" | "auth.leaked_password_protection" | "auth.advanced_auth_settings" | "auth.performance_settings" | "auth.password_hibp" | "auth.custom_oauth.max_providers" | "backup.retention_days" | "backup.restore_to_new_project" | "backup.schedule" | "function.max_count" | "function.size_limit_mb" | "realtime.max_concurrent_users" | "realtime.max_events_per_second" | "realtime.max_joins_per_second" | "realtime.max_channels_per_client" | "realtime.max_bytes_per_second" | "realtime.max_presence_events_per_second" | "realtime.max_payload_size_in_kb" | "project_scoped_roles" | "security.member_roles" | "project_pausing" | "project_cloning" | "project_restore_after_expiry" | "assistant.advance_model" | "integrations.github_connections" | "dedicated_pooler" | "observability.dashboard_advanced_metrics"; + key: "instances.compute_update_available_sizes" | "instances.read_replicas" | "instances.disk_modifications" | "instances.high_availability" | "instances.orioledb" | "replication.etl" | "storage.max_file_size" | "storage.max_file_size.configurable" | "storage.image_transformations" | "storage.vector_buckets" | "storage.iceberg_catalog" | "storage.purge_cache" | "security.audit_logs_days" | "security.questionnaire" | "security.soc2_report" | "security.iso27001_certificate" | "security.private_link" | "security.enforce_mfa" | "log.retention_days" | "custom_domain" | "vanity_subdomain" | "ipv4" | "pitr.available_variants" | "log_drains" | "audit_log_drains" | "branching_limit" | "branching_persistent" | "auth.mfa_phone" | "auth.mfa_web_authn" | "auth.mfa_enhanced_security" | "auth.hooks" | "auth.platform.sso" | "auth.custom_jwt_template" | "auth.saml_2" | "auth.user_sessions" | "auth.leaked_password_protection" | "auth.advanced_auth_settings" | "auth.performance_settings" | "auth.password_hibp" | "auth.custom_oauth.max_providers" | "backup.retention_days" | "backup.restore_to_new_project" | "backup.schedule" | "function.max_count" | "function.size_limit_mb" | "realtime.max_concurrent_users" | "realtime.max_events_per_second" | "realtime.max_joins_per_second" | "realtime.max_channels_per_client" | "realtime.max_bytes_per_second" | "realtime.max_presence_events_per_second" | "realtime.max_payload_size_in_kb" | "project_scoped_roles" | "security.member_roles" | "project_pausing" | "project_cloning" | "project_restore_after_expiry" | "assistant.advance_model" | "integrations.github_connections" | "dedicated_pooler" | "observability.dashboard_advanced_metrics" | "api.members.roles"; /** @enum {string} */ type: "boolean" | "numeric" | "set"; }; @@ -4815,6 +5020,7 @@ export interface components { email?: string; role_name: string; mfa_enabled: boolean; + avatar_url: string | null; }; V1OrganizationSlugResponse: { id: string; @@ -5378,6 +5584,7 @@ export interface operations { code_challenge_method?: "plain" | "sha256" | "S256"; /** @description Organization slug */ organization_slug?: string; + target_flow?: string; /** @description Resource indicator for MCP (Model Context Protocol) clients */ resource?: string; }; @@ -8176,7 +8383,7 @@ export interface operations { }; }; responses: { - 201: { + 204: { headers: { [name: string]: unknown; }; @@ -8235,7 +8442,7 @@ export interface operations { }; }; responses: { - 201: { + 204: { headers: { [name: string]: unknown; }; @@ -8959,6 +9166,47 @@ export interface operations { }; }; }; + "v1-restart-a-project": { + parameters: { + query?: never; + header?: never; + path: { + /** @description Project ref */ + ref: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Forbidden action */ + 403: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Rate limit exceeded */ + 429: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; "v1-list-available-restore-versions": { parameters: { query?: never; @@ -9450,6 +9698,61 @@ export interface operations { }; }; }; + "v1-get-project-logs-all": { + parameters: { + query?: { + /** @description Custom SQL query to execute on the logs. See [querying logs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer) for more details. */ + sql?: string; + iso_timestamp_start?: string; + iso_timestamp_end?: string; + }; + header?: never; + path: { + /** @description Project ref */ + ref: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AnalyticsResponse"]; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Usage exceeded. Enable additional usage to continue querying */ + 402: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Forbidden action */ + 403: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Rate limit exceeded */ + 429: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; "v1-get-project-logs": { parameters: { query?: { @@ -9482,6 +9785,13 @@ export interface operations { }; content?: never; }; + /** @description Usage exceeded. Enable additional usage to continue querying */ + 402: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; /** @description Forbidden action */ 403: { headers: { @@ -10416,7 +10726,7 @@ export interface operations { }; content?: never; }; - /** @description Failed to upsert database migration */ + /** @description Failed to update JIT access */ 500: { headers: { [name: string]: unknown; @@ -10529,6 +10839,142 @@ export interface operations { }; }; }; + "v1-invite-external-jit-access": { + parameters: { + query?: never; + header?: never; + path: { + /** @description Project ref */ + ref: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["InviteExternalUserJitAccessBody"]; + }; + }; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["InviteExternalUserJitResponse"]; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Forbidden action */ + 403: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Rate limit exceeded */ + 429: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Failed to invite external user */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + "v1-accept-invite-external-jit-access": { + parameters: { + query?: never; + header?: never; + path: { + /** @description Project ref */ + ref: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AcceptInviteExternalUserJitAccessBody"]; + }; + }; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["JitAccessResponse"]; + }; + }; + /** @description Failed to accept invitation */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + "v1-delete-invite-external-jit-access": { + parameters: { + query?: never; + header?: never; + path: { + /** @description Project ref */ + ref: string; + invite_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Forbidden action */ + 403: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Rate limit exceeded */ + 429: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Failed to revoke invite for external user */ + 500: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; "v1-delete-jit-access": { parameters: { query?: never;