From 01ab9b4cf0aabb38d1bc63791e25692fd8705e5c Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Mon, 8 Jun 2026 11:38:03 -0300 Subject: [PATCH 01/36] feat: migrate capabilities to per-feature markdown files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace five monolithic YAML area files with one markdown file per feature, following a Swift Evolution-style proposal structure. - `capabilities/areas.yaml` — area registry with titles, descriptions, and ordered group definitions - `capabilities/{area}/NNNN-slug.md` — one file per feature; ID is derived from folder + stem (hyphens → underscores, numeric prefix stripped); SDK entries are sparse (unlisted = not_implemented) - `capabilities/TEMPLATE.md` — blank template with HTML comment guidance for each section; `capabilities/auth/0001-sign-up.md` serves as the canonical worked example Spec template sections: Behavior (required), Prerequisites, Errors, Notes, Related (all optional). Body is reserved for feature specification; all matrix data remains in YAML frontmatter. Co-Authored-By: Claude Sonnet 4.6 --- capabilities/TEMPLATE.md | 40 + capabilities/areas.yaml | 48 + capabilities/auth.yaml | 1156 ----------------- capabilities/auth/0001-sign-up.md | 45 + .../auth/0002-sign-in-with-password.md | 12 + capabilities/auth/0003-sign-in-with-otp.md | 12 + capabilities/auth/0004-sign-in-with-oauth.md | 12 + .../auth/0005-sign-in-with-id-token.md | 12 + capabilities/auth/0006-sign-in-with-sso.md | 12 + capabilities/auth/0007-sign-in-anonymously.md | 12 + capabilities/auth/0008-sign-in-with-web3.md | 12 + capabilities/auth/0009-verify-otp.md | 12 + .../auth/0010-exchange-code-for-session.md | 12 + capabilities/auth/0011-resend.md | 12 + capabilities/auth/0012-reauthenticate.md | 12 + .../auth/0013-reset-password-for-email.md | 12 + .../auth/0014-sign-in-with-passkey.md | 12 + capabilities/auth/0015-register-passkey.md | 12 + capabilities/auth/0016-get-session.md | 12 + capabilities/auth/0017-set-session.md | 12 + capabilities/auth/0018-refresh-session.md | 12 + capabilities/auth/0019-get-user.md | 12 + capabilities/auth/0020-update-user.md | 12 + capabilities/auth/0021-get-claims.md | 12 + .../auth/0022-on-auth-state-change.md | 12 + capabilities/auth/0023-sign-out.md | 12 + capabilities/auth/0024-auto-refresh-token.md | 12 + capabilities/auth/0025-restore-session.md | 12 + capabilities/auth/0026-get-user-identities.md | 12 + capabilities/auth/0027-link-identity.md | 12 + capabilities/auth/0028-unlink-identity.md | 12 + capabilities/auth/0029-mfa-enroll.md | 12 + capabilities/auth/0030-mfa-challenge.md | 12 + capabilities/auth/0031-mfa-verify.md | 12 + .../auth/0032-mfa-challenge-and-verify.md | 12 + capabilities/auth/0033-mfa-unenroll.md | 12 + capabilities/auth/0034-mfa-list-factors.md | 12 + capabilities/auth/0035-mfa-get-aal.md | 12 + .../0036-mfa-webauthn-start-registration.md | 12 + .../0037-mfa-webauthn-verify-registration.md | 12 + .../0038-mfa-webauthn-start-authentication.md | 12 + ...0039-mfa-webauthn-verify-authentication.md | 12 + capabilities/auth/0040-mfa-webauthn-list.md | 12 + capabilities/auth/0041-mfa-webauthn-update.md | 12 + capabilities/auth/0042-mfa-webauthn-delete.md | 12 + .../0043-oauth-get-authorization-details.md | 12 + .../auth/0044-oauth-approve-authorization.md | 12 + .../auth/0045-oauth-deny-authorization.md | 12 + capabilities/auth/0046-oauth-list-grants.md | 12 + capabilities/auth/0047-oauth-revoke-grant.md | 12 + capabilities/auth/0048-admin-sign-out.md | 12 + .../auth/0049-admin-invite-user-by-email.md | 12 + capabilities/auth/0050-admin-generate-link.md | 12 + capabilities/auth/0051-admin-create-user.md | 12 + capabilities/auth/0052-admin-list-users.md | 12 + .../auth/0053-admin-get-user-by-id.md | 12 + .../auth/0054-admin-update-user-by-id.md | 12 + capabilities/auth/0055-admin-delete-user.md | 12 + .../auth/0056-admin-mfa-list-factors.md | 12 + .../auth/0057-admin-mfa-delete-factor.md | 12 + .../auth/0058-admin-oauth-list-clients.md | 12 + .../auth/0059-admin-oauth-create-client.md | 12 + .../auth/0060-admin-oauth-get-client.md | 12 + .../auth/0061-admin-oauth-update-client.md | 12 + .../auth/0062-admin-oauth-delete-client.md | 12 + ...63-admin-oauth-regenerate-client-secret.md | 12 + capabilities/database.yaml | 23 - capabilities/database/0001-select.md | 12 + capabilities/functions.yaml | 23 - capabilities/functions/0001-invoke.md | 12 + capabilities/realtime.yaml | 23 - .../realtime/0001-postgres-changes.md | 12 + capabilities/storage.yaml | 23 - capabilities/storage/0001-upload.md | 12 + 74 files changed, 925 insertions(+), 1248 deletions(-) create mode 100644 capabilities/TEMPLATE.md create mode 100644 capabilities/areas.yaml delete mode 100644 capabilities/auth.yaml create mode 100644 capabilities/auth/0001-sign-up.md create mode 100644 capabilities/auth/0002-sign-in-with-password.md create mode 100644 capabilities/auth/0003-sign-in-with-otp.md create mode 100644 capabilities/auth/0004-sign-in-with-oauth.md create mode 100644 capabilities/auth/0005-sign-in-with-id-token.md create mode 100644 capabilities/auth/0006-sign-in-with-sso.md create mode 100644 capabilities/auth/0007-sign-in-anonymously.md create mode 100644 capabilities/auth/0008-sign-in-with-web3.md create mode 100644 capabilities/auth/0009-verify-otp.md create mode 100644 capabilities/auth/0010-exchange-code-for-session.md create mode 100644 capabilities/auth/0011-resend.md create mode 100644 capabilities/auth/0012-reauthenticate.md create mode 100644 capabilities/auth/0013-reset-password-for-email.md create mode 100644 capabilities/auth/0014-sign-in-with-passkey.md create mode 100644 capabilities/auth/0015-register-passkey.md create mode 100644 capabilities/auth/0016-get-session.md create mode 100644 capabilities/auth/0017-set-session.md create mode 100644 capabilities/auth/0018-refresh-session.md create mode 100644 capabilities/auth/0019-get-user.md create mode 100644 capabilities/auth/0020-update-user.md create mode 100644 capabilities/auth/0021-get-claims.md create mode 100644 capabilities/auth/0022-on-auth-state-change.md create mode 100644 capabilities/auth/0023-sign-out.md create mode 100644 capabilities/auth/0024-auto-refresh-token.md create mode 100644 capabilities/auth/0025-restore-session.md create mode 100644 capabilities/auth/0026-get-user-identities.md create mode 100644 capabilities/auth/0027-link-identity.md create mode 100644 capabilities/auth/0028-unlink-identity.md create mode 100644 capabilities/auth/0029-mfa-enroll.md create mode 100644 capabilities/auth/0030-mfa-challenge.md create mode 100644 capabilities/auth/0031-mfa-verify.md create mode 100644 capabilities/auth/0032-mfa-challenge-and-verify.md create mode 100644 capabilities/auth/0033-mfa-unenroll.md create mode 100644 capabilities/auth/0034-mfa-list-factors.md create mode 100644 capabilities/auth/0035-mfa-get-aal.md create mode 100644 capabilities/auth/0036-mfa-webauthn-start-registration.md create mode 100644 capabilities/auth/0037-mfa-webauthn-verify-registration.md create mode 100644 capabilities/auth/0038-mfa-webauthn-start-authentication.md create mode 100644 capabilities/auth/0039-mfa-webauthn-verify-authentication.md create mode 100644 capabilities/auth/0040-mfa-webauthn-list.md create mode 100644 capabilities/auth/0041-mfa-webauthn-update.md create mode 100644 capabilities/auth/0042-mfa-webauthn-delete.md create mode 100644 capabilities/auth/0043-oauth-get-authorization-details.md create mode 100644 capabilities/auth/0044-oauth-approve-authorization.md create mode 100644 capabilities/auth/0045-oauth-deny-authorization.md create mode 100644 capabilities/auth/0046-oauth-list-grants.md create mode 100644 capabilities/auth/0047-oauth-revoke-grant.md create mode 100644 capabilities/auth/0048-admin-sign-out.md create mode 100644 capabilities/auth/0049-admin-invite-user-by-email.md create mode 100644 capabilities/auth/0050-admin-generate-link.md create mode 100644 capabilities/auth/0051-admin-create-user.md create mode 100644 capabilities/auth/0052-admin-list-users.md create mode 100644 capabilities/auth/0053-admin-get-user-by-id.md create mode 100644 capabilities/auth/0054-admin-update-user-by-id.md create mode 100644 capabilities/auth/0055-admin-delete-user.md create mode 100644 capabilities/auth/0056-admin-mfa-list-factors.md create mode 100644 capabilities/auth/0057-admin-mfa-delete-factor.md create mode 100644 capabilities/auth/0058-admin-oauth-list-clients.md create mode 100644 capabilities/auth/0059-admin-oauth-create-client.md create mode 100644 capabilities/auth/0060-admin-oauth-get-client.md create mode 100644 capabilities/auth/0061-admin-oauth-update-client.md create mode 100644 capabilities/auth/0062-admin-oauth-delete-client.md create mode 100644 capabilities/auth/0063-admin-oauth-regenerate-client-secret.md delete mode 100644 capabilities/database.yaml create mode 100644 capabilities/database/0001-select.md delete mode 100644 capabilities/functions.yaml create mode 100644 capabilities/functions/0001-invoke.md delete mode 100644 capabilities/realtime.yaml create mode 100644 capabilities/realtime/0001-postgres-changes.md delete mode 100644 capabilities/storage.yaml create mode 100644 capabilities/storage/0001-upload.md diff --git a/capabilities/TEMPLATE.md b/capabilities/TEMPLATE.md new file mode 100644 index 00000000..80f82d56 --- /dev/null +++ b/capabilities/TEMPLATE.md @@ -0,0 +1,40 @@ +--- +name: Feature Name +description: One-sentence description of what this feature does. +group: group-id +sdks: + javascript: + status: implemented + references: + - repo: owner/repo + path: path/to/file.ts + symbols: [symbolName] +--- + +## Behavior + + + +## Prerequisites + + + +## Errors + + + +- `error_code` — description of when this error is returned + +## Notes + + + +## Related + + + +- [Feature Name](area.feature_id) — why it's related diff --git a/capabilities/areas.yaml b/capabilities/areas.yaml new file mode 100644 index 00000000..35277e19 --- /dev/null +++ b/capabilities/areas.yaml @@ -0,0 +1,48 @@ +auth: + title: Authentication + description: User sign-in flows, session management, MFA, passkeys, identity linking, and admin operations. + groups: + - id: sign-in + title: Sign-in / Sign-up + - id: passkey + title: Passkeys + - id: session + title: Session & User + - id: identities + title: Identity Linking + - id: mfa + title: Multi-Factor Authentication + - id: mfa-webauthn + title: WebAuthn MFA + - id: oauth-server + title: OAuth Server + - id: admin + title: Admin API + +database: + title: Database (PostgREST) + description: Query builder over PostgREST — select, insert, update, delete, RPC. + groups: + - id: query + title: Query + +realtime: + title: Realtime + description: Subscribe to Postgres changes, broadcast, and presence over websockets. + groups: + - id: channels + title: Channels + +storage: + title: Storage + description: Object storage — upload, download, list, and manage files in buckets. + groups: + - id: objects + title: Objects + +functions: + title: Edge Functions + description: Invoke Supabase Edge Functions from the client. + groups: + - id: invocation + title: Invocation diff --git a/capabilities/auth.yaml b/capabilities/auth.yaml deleted file mode 100644 index 422804b9..00000000 --- a/capabilities/auth.yaml +++ /dev/null @@ -1,1156 +0,0 @@ -# yaml-language-server: $schema=../schema/capability-matrix.schema.json -area: auth -title: Authentication -description: User sign-in flows, session management, MFA, passkeys, identity linking, and admin operations. - -features: - - # ── Sign-in / sign-up ──────────────────────────────────────────────────────── - - - id: auth.sign_up - name: Sign Up - description: Register a new user with email or phone and password. - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [signUp] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.sign_in_with_password - name: Sign In with Password - description: Authenticate an existing user with email or phone and password. - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [signInWithPassword] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.sign_in_with_otp - name: Sign In with OTP - description: Send a one-time password (email or SMS) or magic link and authenticate with it. - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [signInWithOtp] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.sign_in_with_oauth - name: Sign In with OAuth - description: Initiate a third-party OAuth sign-in flow (Google, GitHub, etc.). - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [signInWithOAuth] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.sign_in_with_id_token - name: Sign In with ID Token - description: Authenticate using a provider-issued ID token (e.g. from Apple or Google). - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [signInWithIdToken] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.sign_in_with_sso - name: Sign In with SSO - description: Sign in via SAML SSO by supplying a domain or provider ID. - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [signInWithSSO] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.sign_in_anonymously - name: Sign In Anonymously - description: Create an anonymous (guest) session without user credentials. - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [signInAnonymously] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.sign_in_with_web3 - name: Sign In with Web3 - description: Authenticate using a Web3 wallet (Solana or Ethereum) via a signed message. - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [signInWithWeb3] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.verify_otp - name: Verify OTP - description: Verify a one-time password or token hash to complete sign-in or email confirmation. - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [verifyOtp] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.exchange_code_for_session - name: Exchange Code for Session - description: Exchange a PKCE authorization code for a user session. - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [exchangeCodeForSession] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.resend - name: Resend Confirmation - description: Resend a signup confirmation or OTP email/SMS to a user. - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [resend] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.reauthenticate - name: Reauthenticate - description: Send a reauthentication nonce to verify the user before sensitive operations such as password change. - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [reauthenticate] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.reset_password_for_email - name: Reset Password for Email - description: Send a password-reset email to a user. - group: sign-in - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [resetPasswordForEmail] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - # ── Passkeys ────────────────────────────────────────────────────────────────── - - - id: auth.sign_in_with_passkey - name: Sign In with Passkey - description: Authenticate using a WebAuthn passkey registered on the device. - group: passkey - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [signInWithPasskey] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.register_passkey - name: Register Passkey - description: Register a new WebAuthn passkey for the currently authenticated user. - group: passkey - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [registerPasskey] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - # ── Session & user ──────────────────────────────────────────────────────────── - - - id: auth.get_session - name: Get Session - description: Return the current active session, refreshing the access token if needed. - group: session - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [getSession] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.set_session - name: Set Session - description: Manually set the current session from a known access token and refresh token. - group: session - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [setSession] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.refresh_session - name: Refresh Session - description: Force an immediate refresh of the current session using the refresh token. - group: session - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [refreshSession] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.get_user - name: Get User - description: Fetch the authenticated user's profile from the server, verifying the JWT. - group: session - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [getUser] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.update_user - name: Update User - description: Update the current user's attributes such as email, password, or metadata. - group: session - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [updateUser] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.get_claims - name: Get Claims - description: Verify and return the JWT claims for the current session using asymmetric keys. - group: session - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [getClaims] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.on_auth_state_change - name: On Auth State Change - description: Subscribe to authentication state change events (sign-in, sign-out, token refresh, etc.). - group: session - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [onAuthStateChange] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.sign_out - name: Sign Out - description: Revoke the current user session and clear stored credentials. - group: session - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [signOut] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.auto_refresh_token - name: Auto Refresh Token - description: SDK automatically refreshes the access token in the background before it expires; exposes hooks to start and stop the refresh loop. - group: session - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [startAutoRefresh, stopAutoRefresh] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.restore_session - name: Restore Session - description: SDK restores a persisted session from local storage on client initialization. - group: session - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [initialize] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - # ── Identity linking ────────────────────────────────────────────────────────── - - - id: auth.get_user_identities - name: Get User Identities - description: List all external identities linked to the current user's account. - group: identities - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [getUserIdentities] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.link_identity - name: Link Identity - description: Link an additional OAuth or ID-token identity to the current user's account. - group: identities - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [linkIdentity] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.unlink_identity - name: Unlink Identity - description: Remove a linked identity from the current user's account. - group: identities - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [unlinkIdentity] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - # ── MFA ─────────────────────────────────────────────────────────────────────── - - - id: auth.mfa_enroll - name: MFA Enroll - description: Enroll a new MFA factor (TOTP or phone) for the current user. - group: mfa - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [enroll] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_challenge - name: MFA Challenge - description: Create a challenge for an enrolled MFA factor to begin the verification flow. - group: mfa - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [challenge] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_verify - name: MFA Verify - description: Verify a code against an active MFA challenge to complete second-factor authentication. - group: mfa - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [verify] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_challenge_and_verify - name: MFA Challenge and Verify - description: Create a challenge and verify a code in a single call for convenience. - group: mfa - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [challengeAndVerify] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_unenroll - name: MFA Unenroll - description: Remove an enrolled MFA factor from the current user's account. - group: mfa - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [unenroll] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_list_factors - name: MFA List Factors - description: List all MFA factors enrolled for the current user. - group: mfa - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [listFactors] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_get_aal - name: MFA Get Authenticator Assurance Level - description: Return the current and next authenticator assurance levels (AAL1/AAL2) for the session. - group: mfa - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [getAuthenticatorAssuranceLevel] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - # ── WebAuthn MFA ────────────────────────────────────────────────────────────── - - - id: auth.mfa_webauthn_start_registration - name: MFA WebAuthn Start Registration - description: Begin WebAuthn authenticator registration by generating credential creation options. - group: mfa-webauthn - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_startPasskeyRegistration] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_webauthn_verify_registration - name: MFA WebAuthn Verify Registration - description: Complete WebAuthn authenticator registration by verifying the credential response. - group: mfa-webauthn - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_verifyPasskeyRegistration] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_webauthn_start_authentication - name: MFA WebAuthn Start Authentication - description: Begin WebAuthn authentication by generating assertion options for an enrolled authenticator. - group: mfa-webauthn - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_startPasskeyAuthentication] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_webauthn_verify_authentication - name: MFA WebAuthn Verify Authentication - description: Complete WebAuthn authentication by verifying the assertion response. - group: mfa-webauthn - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_verifyPasskeyAuthentication] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_webauthn_list - name: MFA WebAuthn List Authenticators - description: List all WebAuthn authenticators registered for the current user. - group: mfa-webauthn - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_listPasskeys] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_webauthn_update - name: MFA WebAuthn Update Authenticator - description: Update metadata (e.g. friendly name) on a registered WebAuthn authenticator. - group: mfa-webauthn - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_updatePasskey] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.mfa_webauthn_delete - name: MFA WebAuthn Delete Authenticator - description: Remove a registered WebAuthn authenticator from the current user's account. - group: mfa-webauthn - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_deletePasskey] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - # ── OAuth server (Supabase as OAuth provider) ───────────────────────────────── - - - id: auth.oauth_get_authorization_details - name: OAuth Get Authorization Details - description: Fetch the details of a pending OAuth authorization request (for consent screens). - group: oauth-server - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_getAuthorizationDetails] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.oauth_approve_authorization - name: OAuth Approve Authorization - description: Approve a pending OAuth authorization request on behalf of the current user. - group: oauth-server - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_approveAuthorization] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.oauth_deny_authorization - name: OAuth Deny Authorization - description: Deny a pending OAuth authorization request on behalf of the current user. - group: oauth-server - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_denyAuthorization] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.oauth_list_grants - name: OAuth List Grants - description: List all active OAuth grants the current user has approved. - group: oauth-server - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_listOAuthGrants] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.oauth_revoke_grant - name: OAuth Revoke Grant - description: Revoke a specific OAuth grant that the current user previously approved. - group: oauth-server - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [_revokeOAuthGrant] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - # ── Admin API (service-role) ────────────────────────────────────────────────── - - - id: auth.admin_sign_out - name: Admin Sign Out - description: Revoke a user's session server-side by their access token (requires service role). - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [signOut] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_invite_user_by_email - name: Admin Invite User by Email - description: Send an invite email to a new user (requires service role). - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [inviteUserByEmail] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_generate_link - name: Admin Generate Link - description: Generate an email action link (confirmation, magic link, recovery) for a user. - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [generateLink] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_create_user - name: Admin Create User - description: Create a new user with specified attributes without sending a confirmation email. - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [createUser] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_list_users - name: Admin List Users - description: Retrieve a paginated list of all users in the project. - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [listUsers] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_get_user_by_id - name: Admin Get User by ID - description: Fetch a single user's profile and metadata by their UUID. - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [getUserById] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_update_user_by_id - name: Admin Update User by ID - description: Update a user's attributes (email, password, metadata, role, etc.) by their UUID. - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [updateUserById] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_delete_user - name: Admin Delete User - description: Permanently delete a user by their UUID (hard or soft delete). - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [deleteUser] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_mfa_list_factors - name: Admin MFA List Factors - description: List all MFA factors enrolled for a specific user (requires service role). - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [listFactors] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_mfa_delete_factor - name: Admin MFA Delete Factor - description: Delete a specific MFA factor from a user's account (requires service role). - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [deleteFactor] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_oauth_list_clients - name: Admin OAuth List Clients - description: List all registered OAuth clients for the project (requires service role). - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [_listOAuthClients] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_oauth_create_client - name: Admin OAuth Create Client - description: Register a new OAuth client application for the project (requires service role). - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [_createOAuthClient] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_oauth_get_client - name: Admin OAuth Get Client - description: Retrieve details of a specific OAuth client by its client ID. - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [_getOAuthClient] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_oauth_update_client - name: Admin OAuth Update Client - description: Update a registered OAuth client's settings (name, redirect URIs, etc.). - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [_updateOAuthClient] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_oauth_delete_client - name: Admin OAuth Delete Client - description: Remove a registered OAuth client from the project. - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [_deleteOAuthClient] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } - - - id: auth.admin_oauth_regenerate_client_secret - name: Admin OAuth Regenerate Client Secret - description: Regenerate the client secret for a registered OAuth application. - group: admin - sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueAdminApi.ts - symbols: [_regenerateOAuthClientSecret] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } diff --git a/capabilities/auth/0001-sign-up.md b/capabilities/auth/0001-sign-up.md new file mode 100644 index 00000000..030bbb14 --- /dev/null +++ b/capabilities/auth/0001-sign-up.md @@ -0,0 +1,45 @@ +--- +name: Sign Up +description: Register a new user with email or phone and password. +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [signUp] +--- + +## Behavior + +Accepts `credentials` — either an `email`+`password` pair or a `phone`+`password` pair — and an +optional `options` object. Creates a new user account in the project and returns the new `User` +alongside a `Session`. + +`signUp(credentials: { email, password } | { phone, password }, options?) → { user, session }` + +If the project has email or phone confirmation enabled, the returned `Session` is `null` until the +user confirms their address; the `User` is always returned immediately. + +## Prerequisites + +The client must not already have an active session. Calling this while signed in creates a second +account rather than associating the credentials with the current user. + +## Errors + +- `email_exists` — a user with this email already exists in the project +- `weak_password` — the password does not satisfy the project's configured strength policy +- `signup_disabled` — user sign-ups are disabled for this project + +## Notes + +When email confirmation is required, the session is `null` on return. The caller should prompt the +user to check their inbox and use `auth.verify_otp` or `auth.resend` as the next step. + +## Related + +- [Verify OTP](auth.verify_otp) — required next step when sign-up triggers a confirmation flow +- [Resend Confirmation](auth.resend) — resend the confirmation email if the user did not receive it +- [Sign In with Password](auth.sign_in_with_password) — authenticate an already-registered account diff --git a/capabilities/auth/0002-sign-in-with-password.md b/capabilities/auth/0002-sign-in-with-password.md new file mode 100644 index 00000000..39faeca9 --- /dev/null +++ b/capabilities/auth/0002-sign-in-with-password.md @@ -0,0 +1,12 @@ +--- +name: Sign In with Password +description: Authenticate an existing user with email or phone and password. +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [signInWithPassword] +--- diff --git a/capabilities/auth/0003-sign-in-with-otp.md b/capabilities/auth/0003-sign-in-with-otp.md new file mode 100644 index 00000000..36cd3828 --- /dev/null +++ b/capabilities/auth/0003-sign-in-with-otp.md @@ -0,0 +1,12 @@ +--- +name: Sign In with OTP +description: Send a one-time password (email or SMS) or magic link and authenticate with it. +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [signInWithOtp] +--- diff --git a/capabilities/auth/0004-sign-in-with-oauth.md b/capabilities/auth/0004-sign-in-with-oauth.md new file mode 100644 index 00000000..b9dad2eb --- /dev/null +++ b/capabilities/auth/0004-sign-in-with-oauth.md @@ -0,0 +1,12 @@ +--- +name: Sign In with OAuth +description: Initiate a third-party OAuth sign-in flow (Google, GitHub, etc.). +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [signInWithOAuth] +--- diff --git a/capabilities/auth/0005-sign-in-with-id-token.md b/capabilities/auth/0005-sign-in-with-id-token.md new file mode 100644 index 00000000..48d41c01 --- /dev/null +++ b/capabilities/auth/0005-sign-in-with-id-token.md @@ -0,0 +1,12 @@ +--- +name: Sign In with ID Token +description: Authenticate using a provider-issued ID token (e.g. from Apple or Google). +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [signInWithIdToken] +--- diff --git a/capabilities/auth/0006-sign-in-with-sso.md b/capabilities/auth/0006-sign-in-with-sso.md new file mode 100644 index 00000000..7d7745da --- /dev/null +++ b/capabilities/auth/0006-sign-in-with-sso.md @@ -0,0 +1,12 @@ +--- +name: Sign In with SSO +description: Sign in via SAML SSO by supplying a domain or provider ID. +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [signInWithSSO] +--- diff --git a/capabilities/auth/0007-sign-in-anonymously.md b/capabilities/auth/0007-sign-in-anonymously.md new file mode 100644 index 00000000..5bc35b86 --- /dev/null +++ b/capabilities/auth/0007-sign-in-anonymously.md @@ -0,0 +1,12 @@ +--- +name: Sign In Anonymously +description: Create an anonymous (guest) session without user credentials. +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [signInAnonymously] +--- diff --git a/capabilities/auth/0008-sign-in-with-web3.md b/capabilities/auth/0008-sign-in-with-web3.md new file mode 100644 index 00000000..5bd01dea --- /dev/null +++ b/capabilities/auth/0008-sign-in-with-web3.md @@ -0,0 +1,12 @@ +--- +name: Sign In with Web3 +description: Authenticate using a Web3 wallet (Solana or Ethereum) via a signed message. +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [signInWithWeb3] +--- diff --git a/capabilities/auth/0009-verify-otp.md b/capabilities/auth/0009-verify-otp.md new file mode 100644 index 00000000..50b95c46 --- /dev/null +++ b/capabilities/auth/0009-verify-otp.md @@ -0,0 +1,12 @@ +--- +name: Verify OTP +description: Verify a one-time password or token hash to complete sign-in or email confirmation. +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [verifyOtp] +--- diff --git a/capabilities/auth/0010-exchange-code-for-session.md b/capabilities/auth/0010-exchange-code-for-session.md new file mode 100644 index 00000000..688333ba --- /dev/null +++ b/capabilities/auth/0010-exchange-code-for-session.md @@ -0,0 +1,12 @@ +--- +name: Exchange Code for Session +description: Exchange a PKCE authorization code for a user session. +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [exchangeCodeForSession] +--- diff --git a/capabilities/auth/0011-resend.md b/capabilities/auth/0011-resend.md new file mode 100644 index 00000000..5299a7e3 --- /dev/null +++ b/capabilities/auth/0011-resend.md @@ -0,0 +1,12 @@ +--- +name: Resend Confirmation +description: Resend a signup confirmation or OTP email/SMS to a user. +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [resend] +--- diff --git a/capabilities/auth/0012-reauthenticate.md b/capabilities/auth/0012-reauthenticate.md new file mode 100644 index 00000000..8a398d83 --- /dev/null +++ b/capabilities/auth/0012-reauthenticate.md @@ -0,0 +1,12 @@ +--- +name: Reauthenticate +description: Send a reauthentication nonce to verify the user before sensitive operations such as password change. +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [reauthenticate] +--- diff --git a/capabilities/auth/0013-reset-password-for-email.md b/capabilities/auth/0013-reset-password-for-email.md new file mode 100644 index 00000000..ceb22c9f --- /dev/null +++ b/capabilities/auth/0013-reset-password-for-email.md @@ -0,0 +1,12 @@ +--- +name: Reset Password for Email +description: Send a password-reset email to a user. +group: sign-in +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [resetPasswordForEmail] +--- diff --git a/capabilities/auth/0014-sign-in-with-passkey.md b/capabilities/auth/0014-sign-in-with-passkey.md new file mode 100644 index 00000000..9d81dec8 --- /dev/null +++ b/capabilities/auth/0014-sign-in-with-passkey.md @@ -0,0 +1,12 @@ +--- +name: Sign In with Passkey +description: Authenticate using a WebAuthn passkey registered on the device. +group: passkey +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [signInWithPasskey] +--- diff --git a/capabilities/auth/0015-register-passkey.md b/capabilities/auth/0015-register-passkey.md new file mode 100644 index 00000000..464c9a7e --- /dev/null +++ b/capabilities/auth/0015-register-passkey.md @@ -0,0 +1,12 @@ +--- +name: Register Passkey +description: Register a new WebAuthn passkey for the currently authenticated user. +group: passkey +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [registerPasskey] +--- diff --git a/capabilities/auth/0016-get-session.md b/capabilities/auth/0016-get-session.md new file mode 100644 index 00000000..d73c7095 --- /dev/null +++ b/capabilities/auth/0016-get-session.md @@ -0,0 +1,12 @@ +--- +name: Get Session +description: Return the current active session, refreshing the access token if needed. +group: session +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [getSession] +--- diff --git a/capabilities/auth/0017-set-session.md b/capabilities/auth/0017-set-session.md new file mode 100644 index 00000000..938fe79f --- /dev/null +++ b/capabilities/auth/0017-set-session.md @@ -0,0 +1,12 @@ +--- +name: Set Session +description: Manually set the current session from a known access token and refresh token. +group: session +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [setSession] +--- diff --git a/capabilities/auth/0018-refresh-session.md b/capabilities/auth/0018-refresh-session.md new file mode 100644 index 00000000..da36f985 --- /dev/null +++ b/capabilities/auth/0018-refresh-session.md @@ -0,0 +1,12 @@ +--- +name: Refresh Session +description: Force an immediate refresh of the current session using the refresh token. +group: session +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [refreshSession] +--- diff --git a/capabilities/auth/0019-get-user.md b/capabilities/auth/0019-get-user.md new file mode 100644 index 00000000..3a3396a3 --- /dev/null +++ b/capabilities/auth/0019-get-user.md @@ -0,0 +1,12 @@ +--- +name: Get User +description: Fetch the authenticated user's profile from the server, verifying the JWT. +group: session +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [getUser] +--- diff --git a/capabilities/auth/0020-update-user.md b/capabilities/auth/0020-update-user.md new file mode 100644 index 00000000..a48812b5 --- /dev/null +++ b/capabilities/auth/0020-update-user.md @@ -0,0 +1,12 @@ +--- +name: Update User +description: Update the current user's attributes such as email, password, or metadata. +group: session +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [updateUser] +--- diff --git a/capabilities/auth/0021-get-claims.md b/capabilities/auth/0021-get-claims.md new file mode 100644 index 00000000..fa315538 --- /dev/null +++ b/capabilities/auth/0021-get-claims.md @@ -0,0 +1,12 @@ +--- +name: Get Claims +description: Verify and return the JWT claims for the current session using asymmetric keys. +group: session +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [getClaims] +--- diff --git a/capabilities/auth/0022-on-auth-state-change.md b/capabilities/auth/0022-on-auth-state-change.md new file mode 100644 index 00000000..abd46008 --- /dev/null +++ b/capabilities/auth/0022-on-auth-state-change.md @@ -0,0 +1,12 @@ +--- +name: On Auth State Change +description: Subscribe to authentication state change events (sign-in, sign-out, token refresh, etc.). +group: session +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [onAuthStateChange] +--- diff --git a/capabilities/auth/0023-sign-out.md b/capabilities/auth/0023-sign-out.md new file mode 100644 index 00000000..84648405 --- /dev/null +++ b/capabilities/auth/0023-sign-out.md @@ -0,0 +1,12 @@ +--- +name: Sign Out +description: Revoke the current user session and clear stored credentials. +group: session +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [signOut] +--- diff --git a/capabilities/auth/0024-auto-refresh-token.md b/capabilities/auth/0024-auto-refresh-token.md new file mode 100644 index 00000000..4e722b8b --- /dev/null +++ b/capabilities/auth/0024-auto-refresh-token.md @@ -0,0 +1,12 @@ +--- +name: Auto Refresh Token +description: SDK automatically refreshes the access token in the background before it expires; exposes hooks to start and stop the refresh loop. +group: session +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [startAutoRefresh, stopAutoRefresh] +--- diff --git a/capabilities/auth/0025-restore-session.md b/capabilities/auth/0025-restore-session.md new file mode 100644 index 00000000..9f867582 --- /dev/null +++ b/capabilities/auth/0025-restore-session.md @@ -0,0 +1,12 @@ +--- +name: Restore Session +description: SDK restores a persisted session from local storage on client initialization. +group: session +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [initialize] +--- diff --git a/capabilities/auth/0026-get-user-identities.md b/capabilities/auth/0026-get-user-identities.md new file mode 100644 index 00000000..948dc6ab --- /dev/null +++ b/capabilities/auth/0026-get-user-identities.md @@ -0,0 +1,12 @@ +--- +name: Get User Identities +description: List all external identities linked to the current user's account. +group: identities +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [getUserIdentities] +--- diff --git a/capabilities/auth/0027-link-identity.md b/capabilities/auth/0027-link-identity.md new file mode 100644 index 00000000..d68b0081 --- /dev/null +++ b/capabilities/auth/0027-link-identity.md @@ -0,0 +1,12 @@ +--- +name: Link Identity +description: Link an additional OAuth or ID-token identity to the current user's account. +group: identities +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [linkIdentity] +--- diff --git a/capabilities/auth/0028-unlink-identity.md b/capabilities/auth/0028-unlink-identity.md new file mode 100644 index 00000000..fe6ded8a --- /dev/null +++ b/capabilities/auth/0028-unlink-identity.md @@ -0,0 +1,12 @@ +--- +name: Unlink Identity +description: Remove a linked identity from the current user's account. +group: identities +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [unlinkIdentity] +--- diff --git a/capabilities/auth/0029-mfa-enroll.md b/capabilities/auth/0029-mfa-enroll.md new file mode 100644 index 00000000..b1801ea4 --- /dev/null +++ b/capabilities/auth/0029-mfa-enroll.md @@ -0,0 +1,12 @@ +--- +name: MFA Enroll +description: Enroll a new MFA factor (TOTP or phone) for the current user. +group: mfa +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [enroll] +--- diff --git a/capabilities/auth/0030-mfa-challenge.md b/capabilities/auth/0030-mfa-challenge.md new file mode 100644 index 00000000..01e19326 --- /dev/null +++ b/capabilities/auth/0030-mfa-challenge.md @@ -0,0 +1,12 @@ +--- +name: MFA Challenge +description: Create a challenge for an enrolled MFA factor to begin the verification flow. +group: mfa +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [challenge] +--- diff --git a/capabilities/auth/0031-mfa-verify.md b/capabilities/auth/0031-mfa-verify.md new file mode 100644 index 00000000..d71db9bb --- /dev/null +++ b/capabilities/auth/0031-mfa-verify.md @@ -0,0 +1,12 @@ +--- +name: MFA Verify +description: Verify a code against an active MFA challenge to complete second-factor authentication. +group: mfa +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [verify] +--- diff --git a/capabilities/auth/0032-mfa-challenge-and-verify.md b/capabilities/auth/0032-mfa-challenge-and-verify.md new file mode 100644 index 00000000..d4168cc4 --- /dev/null +++ b/capabilities/auth/0032-mfa-challenge-and-verify.md @@ -0,0 +1,12 @@ +--- +name: MFA Challenge and Verify +description: Create a challenge and verify a code in a single call for convenience. +group: mfa +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [challengeAndVerify] +--- diff --git a/capabilities/auth/0033-mfa-unenroll.md b/capabilities/auth/0033-mfa-unenroll.md new file mode 100644 index 00000000..a29c5a72 --- /dev/null +++ b/capabilities/auth/0033-mfa-unenroll.md @@ -0,0 +1,12 @@ +--- +name: MFA Unenroll +description: Remove an enrolled MFA factor from the current user's account. +group: mfa +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [unenroll] +--- diff --git a/capabilities/auth/0034-mfa-list-factors.md b/capabilities/auth/0034-mfa-list-factors.md new file mode 100644 index 00000000..c2596b9b --- /dev/null +++ b/capabilities/auth/0034-mfa-list-factors.md @@ -0,0 +1,12 @@ +--- +name: MFA List Factors +description: List all MFA factors enrolled for the current user. +group: mfa +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [listFactors] +--- diff --git a/capabilities/auth/0035-mfa-get-aal.md b/capabilities/auth/0035-mfa-get-aal.md new file mode 100644 index 00000000..5c8913ad --- /dev/null +++ b/capabilities/auth/0035-mfa-get-aal.md @@ -0,0 +1,12 @@ +--- +name: MFA Get Authenticator Assurance Level +description: Return the current and next authenticator assurance levels (AAL1/AAL2) for the session. +group: mfa +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [getAuthenticatorAssuranceLevel] +--- diff --git a/capabilities/auth/0036-mfa-webauthn-start-registration.md b/capabilities/auth/0036-mfa-webauthn-start-registration.md new file mode 100644 index 00000000..10471cf0 --- /dev/null +++ b/capabilities/auth/0036-mfa-webauthn-start-registration.md @@ -0,0 +1,12 @@ +--- +name: MFA WebAuthn Start Registration +description: Begin WebAuthn authenticator registration by generating credential creation options. +group: mfa-webauthn +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_startPasskeyRegistration] +--- diff --git a/capabilities/auth/0037-mfa-webauthn-verify-registration.md b/capabilities/auth/0037-mfa-webauthn-verify-registration.md new file mode 100644 index 00000000..f5841b70 --- /dev/null +++ b/capabilities/auth/0037-mfa-webauthn-verify-registration.md @@ -0,0 +1,12 @@ +--- +name: MFA WebAuthn Verify Registration +description: Complete WebAuthn authenticator registration by verifying the credential response. +group: mfa-webauthn +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_verifyPasskeyRegistration] +--- diff --git a/capabilities/auth/0038-mfa-webauthn-start-authentication.md b/capabilities/auth/0038-mfa-webauthn-start-authentication.md new file mode 100644 index 00000000..94288147 --- /dev/null +++ b/capabilities/auth/0038-mfa-webauthn-start-authentication.md @@ -0,0 +1,12 @@ +--- +name: MFA WebAuthn Start Authentication +description: Begin WebAuthn authentication by generating assertion options for an enrolled authenticator. +group: mfa-webauthn +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_startPasskeyAuthentication] +--- diff --git a/capabilities/auth/0039-mfa-webauthn-verify-authentication.md b/capabilities/auth/0039-mfa-webauthn-verify-authentication.md new file mode 100644 index 00000000..a10f2242 --- /dev/null +++ b/capabilities/auth/0039-mfa-webauthn-verify-authentication.md @@ -0,0 +1,12 @@ +--- +name: MFA WebAuthn Verify Authentication +description: Complete WebAuthn authentication by verifying the assertion response. +group: mfa-webauthn +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_verifyPasskeyAuthentication] +--- diff --git a/capabilities/auth/0040-mfa-webauthn-list.md b/capabilities/auth/0040-mfa-webauthn-list.md new file mode 100644 index 00000000..c4969763 --- /dev/null +++ b/capabilities/auth/0040-mfa-webauthn-list.md @@ -0,0 +1,12 @@ +--- +name: MFA WebAuthn List Authenticators +description: List all WebAuthn authenticators registered for the current user. +group: mfa-webauthn +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_listPasskeys] +--- diff --git a/capabilities/auth/0041-mfa-webauthn-update.md b/capabilities/auth/0041-mfa-webauthn-update.md new file mode 100644 index 00000000..619669d0 --- /dev/null +++ b/capabilities/auth/0041-mfa-webauthn-update.md @@ -0,0 +1,12 @@ +--- +name: MFA WebAuthn Update Authenticator +description: Update metadata (e.g. friendly name) on a registered WebAuthn authenticator. +group: mfa-webauthn +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_updatePasskey] +--- diff --git a/capabilities/auth/0042-mfa-webauthn-delete.md b/capabilities/auth/0042-mfa-webauthn-delete.md new file mode 100644 index 00000000..02a4dc5c --- /dev/null +++ b/capabilities/auth/0042-mfa-webauthn-delete.md @@ -0,0 +1,12 @@ +--- +name: MFA WebAuthn Delete Authenticator +description: Remove a registered WebAuthn authenticator from the current user's account. +group: mfa-webauthn +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_deletePasskey] +--- diff --git a/capabilities/auth/0043-oauth-get-authorization-details.md b/capabilities/auth/0043-oauth-get-authorization-details.md new file mode 100644 index 00000000..b7effebf --- /dev/null +++ b/capabilities/auth/0043-oauth-get-authorization-details.md @@ -0,0 +1,12 @@ +--- +name: OAuth Get Authorization Details +description: Fetch the details of a pending OAuth authorization request (for consent screens). +group: oauth-server +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_getAuthorizationDetails] +--- diff --git a/capabilities/auth/0044-oauth-approve-authorization.md b/capabilities/auth/0044-oauth-approve-authorization.md new file mode 100644 index 00000000..1ebb5254 --- /dev/null +++ b/capabilities/auth/0044-oauth-approve-authorization.md @@ -0,0 +1,12 @@ +--- +name: OAuth Approve Authorization +description: Approve a pending OAuth authorization request on behalf of the current user. +group: oauth-server +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_approveAuthorization] +--- diff --git a/capabilities/auth/0045-oauth-deny-authorization.md b/capabilities/auth/0045-oauth-deny-authorization.md new file mode 100644 index 00000000..82b326f2 --- /dev/null +++ b/capabilities/auth/0045-oauth-deny-authorization.md @@ -0,0 +1,12 @@ +--- +name: OAuth Deny Authorization +description: Deny a pending OAuth authorization request on behalf of the current user. +group: oauth-server +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_denyAuthorization] +--- diff --git a/capabilities/auth/0046-oauth-list-grants.md b/capabilities/auth/0046-oauth-list-grants.md new file mode 100644 index 00000000..70809cde --- /dev/null +++ b/capabilities/auth/0046-oauth-list-grants.md @@ -0,0 +1,12 @@ +--- +name: OAuth List Grants +description: List all active OAuth grants the current user has approved. +group: oauth-server +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_listOAuthGrants] +--- diff --git a/capabilities/auth/0047-oauth-revoke-grant.md b/capabilities/auth/0047-oauth-revoke-grant.md new file mode 100644 index 00000000..6c8f4b88 --- /dev/null +++ b/capabilities/auth/0047-oauth-revoke-grant.md @@ -0,0 +1,12 @@ +--- +name: OAuth Revoke Grant +description: Revoke a specific OAuth grant that the current user previously approved. +group: oauth-server +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueClient.ts + symbols: [_revokeOAuthGrant] +--- diff --git a/capabilities/auth/0048-admin-sign-out.md b/capabilities/auth/0048-admin-sign-out.md new file mode 100644 index 00000000..285dd882 --- /dev/null +++ b/capabilities/auth/0048-admin-sign-out.md @@ -0,0 +1,12 @@ +--- +name: Admin Sign Out +description: Revoke a user's session server-side by their access token (requires service role). +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [signOut] +--- diff --git a/capabilities/auth/0049-admin-invite-user-by-email.md b/capabilities/auth/0049-admin-invite-user-by-email.md new file mode 100644 index 00000000..b7f6aa85 --- /dev/null +++ b/capabilities/auth/0049-admin-invite-user-by-email.md @@ -0,0 +1,12 @@ +--- +name: Admin Invite User by Email +description: Send an invite email to a new user (requires service role). +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [inviteUserByEmail] +--- diff --git a/capabilities/auth/0050-admin-generate-link.md b/capabilities/auth/0050-admin-generate-link.md new file mode 100644 index 00000000..55a2045f --- /dev/null +++ b/capabilities/auth/0050-admin-generate-link.md @@ -0,0 +1,12 @@ +--- +name: Admin Generate Link +description: Generate an email action link (confirmation, magic link, recovery) for a user. +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [generateLink] +--- diff --git a/capabilities/auth/0051-admin-create-user.md b/capabilities/auth/0051-admin-create-user.md new file mode 100644 index 00000000..b4d94d06 --- /dev/null +++ b/capabilities/auth/0051-admin-create-user.md @@ -0,0 +1,12 @@ +--- +name: Admin Create User +description: Create a new user with specified attributes without sending a confirmation email. +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [createUser] +--- diff --git a/capabilities/auth/0052-admin-list-users.md b/capabilities/auth/0052-admin-list-users.md new file mode 100644 index 00000000..bf2d6f24 --- /dev/null +++ b/capabilities/auth/0052-admin-list-users.md @@ -0,0 +1,12 @@ +--- +name: Admin List Users +description: Retrieve a paginated list of all users in the project. +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [listUsers] +--- diff --git a/capabilities/auth/0053-admin-get-user-by-id.md b/capabilities/auth/0053-admin-get-user-by-id.md new file mode 100644 index 00000000..f107b996 --- /dev/null +++ b/capabilities/auth/0053-admin-get-user-by-id.md @@ -0,0 +1,12 @@ +--- +name: Admin Get User by ID +description: Fetch a single user's profile and metadata by their UUID. +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [getUserById] +--- diff --git a/capabilities/auth/0054-admin-update-user-by-id.md b/capabilities/auth/0054-admin-update-user-by-id.md new file mode 100644 index 00000000..703c2d8e --- /dev/null +++ b/capabilities/auth/0054-admin-update-user-by-id.md @@ -0,0 +1,12 @@ +--- +name: Admin Update User by ID +description: Update a user's attributes (email, password, metadata, role, etc.) by their UUID. +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [updateUserById] +--- diff --git a/capabilities/auth/0055-admin-delete-user.md b/capabilities/auth/0055-admin-delete-user.md new file mode 100644 index 00000000..c26cfff9 --- /dev/null +++ b/capabilities/auth/0055-admin-delete-user.md @@ -0,0 +1,12 @@ +--- +name: Admin Delete User +description: Permanently delete a user by their UUID (hard or soft delete). +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [deleteUser] +--- diff --git a/capabilities/auth/0056-admin-mfa-list-factors.md b/capabilities/auth/0056-admin-mfa-list-factors.md new file mode 100644 index 00000000..6bf054c6 --- /dev/null +++ b/capabilities/auth/0056-admin-mfa-list-factors.md @@ -0,0 +1,12 @@ +--- +name: Admin MFA List Factors +description: List all MFA factors enrolled for a specific user (requires service role). +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [listFactors] +--- diff --git a/capabilities/auth/0057-admin-mfa-delete-factor.md b/capabilities/auth/0057-admin-mfa-delete-factor.md new file mode 100644 index 00000000..53ebe10f --- /dev/null +++ b/capabilities/auth/0057-admin-mfa-delete-factor.md @@ -0,0 +1,12 @@ +--- +name: Admin MFA Delete Factor +description: Delete a specific MFA factor from a user's account (requires service role). +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [deleteFactor] +--- diff --git a/capabilities/auth/0058-admin-oauth-list-clients.md b/capabilities/auth/0058-admin-oauth-list-clients.md new file mode 100644 index 00000000..12785f4c --- /dev/null +++ b/capabilities/auth/0058-admin-oauth-list-clients.md @@ -0,0 +1,12 @@ +--- +name: Admin OAuth List Clients +description: List all registered OAuth clients for the project (requires service role). +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [_listOAuthClients] +--- diff --git a/capabilities/auth/0059-admin-oauth-create-client.md b/capabilities/auth/0059-admin-oauth-create-client.md new file mode 100644 index 00000000..4c3bacbe --- /dev/null +++ b/capabilities/auth/0059-admin-oauth-create-client.md @@ -0,0 +1,12 @@ +--- +name: Admin OAuth Create Client +description: Register a new OAuth client application for the project (requires service role). +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [_createOAuthClient] +--- diff --git a/capabilities/auth/0060-admin-oauth-get-client.md b/capabilities/auth/0060-admin-oauth-get-client.md new file mode 100644 index 00000000..032bc968 --- /dev/null +++ b/capabilities/auth/0060-admin-oauth-get-client.md @@ -0,0 +1,12 @@ +--- +name: Admin OAuth Get Client +description: Retrieve details of a specific OAuth client by its client ID. +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [_getOAuthClient] +--- diff --git a/capabilities/auth/0061-admin-oauth-update-client.md b/capabilities/auth/0061-admin-oauth-update-client.md new file mode 100644 index 00000000..6585ca93 --- /dev/null +++ b/capabilities/auth/0061-admin-oauth-update-client.md @@ -0,0 +1,12 @@ +--- +name: Admin OAuth Update Client +description: Update a registered OAuth client's settings (name, redirect URIs, etc.). +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [_updateOAuthClient] +--- diff --git a/capabilities/auth/0062-admin-oauth-delete-client.md b/capabilities/auth/0062-admin-oauth-delete-client.md new file mode 100644 index 00000000..56512cf7 --- /dev/null +++ b/capabilities/auth/0062-admin-oauth-delete-client.md @@ -0,0 +1,12 @@ +--- +name: Admin OAuth Delete Client +description: Remove a registered OAuth client from the project. +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [_deleteOAuthClient] +--- diff --git a/capabilities/auth/0063-admin-oauth-regenerate-client-secret.md b/capabilities/auth/0063-admin-oauth-regenerate-client-secret.md new file mode 100644 index 00000000..9e9ab65a --- /dev/null +++ b/capabilities/auth/0063-admin-oauth-regenerate-client-secret.md @@ -0,0 +1,12 @@ +--- +name: Admin OAuth Regenerate Client Secret +description: Regenerate the client secret for a registered OAuth application. +group: admin +sdks: + javascript: + status: implemented + references: + - repo: supabase/supabase-js + path: packages/core/auth-js/src/GoTrueAdminApi.ts + symbols: [_regenerateOAuthClientSecret] +--- diff --git a/capabilities/database.yaml b/capabilities/database.yaml deleted file mode 100644 index bb3c1ccf..00000000 --- a/capabilities/database.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# yaml-language-server: $schema=../schema/capability-matrix.schema.json -area: database -title: Database (PostgREST) -description: Query builder over PostgREST — select, insert, update, delete, RPC. - -features: - - id: database.select - name: Select rows - description: Read rows from a table or view with column selection. - group: query - sdks: - javascript: - status: implemented - references: - - repo: supabase/postgrest-js - path: src/PostgrestQueryBuilder.ts - symbols: [select] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } diff --git a/capabilities/database/0001-select.md b/capabilities/database/0001-select.md new file mode 100644 index 00000000..41a1f2e9 --- /dev/null +++ b/capabilities/database/0001-select.md @@ -0,0 +1,12 @@ +--- +name: Select rows +description: Read rows from a table or view with column selection. +group: query +sdks: + javascript: + status: implemented + references: + - repo: supabase/postgrest-js + path: src/PostgrestQueryBuilder.ts + symbols: [select] +--- diff --git a/capabilities/functions.yaml b/capabilities/functions.yaml deleted file mode 100644 index 743be0ec..00000000 --- a/capabilities/functions.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# yaml-language-server: $schema=../schema/capability-matrix.schema.json -area: functions -title: Edge Functions -description: Invoke Supabase Edge Functions from the client. - -features: - - id: functions.invoke - name: Invoke function - description: Call a deployed Edge Function by name with a request body. - group: invocation - sdks: - javascript: - status: implemented - references: - - repo: supabase/functions-js - path: src/FunctionsClient.ts - symbols: [invoke] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } diff --git a/capabilities/functions/0001-invoke.md b/capabilities/functions/0001-invoke.md new file mode 100644 index 00000000..3474a617 --- /dev/null +++ b/capabilities/functions/0001-invoke.md @@ -0,0 +1,12 @@ +--- +name: Invoke function +description: Call a deployed Edge Function by name with a request body. +group: invocation +sdks: + javascript: + status: implemented + references: + - repo: supabase/functions-js + path: src/FunctionsClient.ts + symbols: [invoke] +--- diff --git a/capabilities/realtime.yaml b/capabilities/realtime.yaml deleted file mode 100644 index 874c5492..00000000 --- a/capabilities/realtime.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# yaml-language-server: $schema=../schema/capability-matrix.schema.json -area: realtime -title: Realtime -description: Subscribe to Postgres changes, broadcast, and presence over websockets. - -features: - - id: realtime.postgres_changes - name: Subscribe to Postgres changes - description: Receive insert/update/delete events for a table over a channel. - group: channels - sdks: - javascript: - status: implemented - references: - - repo: supabase/realtime-js - path: src/RealtimeChannel.ts - symbols: [on] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } diff --git a/capabilities/realtime/0001-postgres-changes.md b/capabilities/realtime/0001-postgres-changes.md new file mode 100644 index 00000000..e500d227 --- /dev/null +++ b/capabilities/realtime/0001-postgres-changes.md @@ -0,0 +1,12 @@ +--- +name: Subscribe to Postgres changes +description: Receive insert/update/delete events for a table over a channel. +group: channels +sdks: + javascript: + status: implemented + references: + - repo: supabase/realtime-js + path: src/RealtimeChannel.ts + symbols: [on] +--- diff --git a/capabilities/storage.yaml b/capabilities/storage.yaml deleted file mode 100644 index a43284aa..00000000 --- a/capabilities/storage.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# yaml-language-server: $schema=../schema/capability-matrix.schema.json -area: storage -title: Storage -description: Object storage — upload, download, list, and manage files in buckets. - -features: - - id: storage.upload - name: Upload file - description: Upload a file to a storage bucket. - group: objects - sdks: - javascript: - status: implemented - references: - - repo: supabase/storage-js - path: src/packages/StorageFileApi.ts - symbols: [upload] - flutter: { status: not_implemented } - python: { status: not_implemented } - swift: { status: not_implemented } - csharp: { status: not_implemented } - go: { status: not_implemented } - kotlin: { status: not_implemented } diff --git a/capabilities/storage/0001-upload.md b/capabilities/storage/0001-upload.md new file mode 100644 index 00000000..e807ed1c --- /dev/null +++ b/capabilities/storage/0001-upload.md @@ -0,0 +1,12 @@ +--- +name: Upload file +description: Upload a file to a storage bucket. +group: objects +sdks: + javascript: + status: implemented + references: + - repo: supabase/storage-js + path: src/packages/StorageFileApi.ts + symbols: [upload] +--- From 47a97d378f622d1b85dd6f66a2c443b6cb7b07e0 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Tue, 9 Jun 2026 16:19:35 -0300 Subject: [PATCH 02/36] feat: add OpenAPI spec references to auth feature files Each auth feature frontmatter now includes an `openapi` block pointing to supabase/auth openapi.yaml and the specific operation(s) it maps to. Format: openapi: repo: supabase/auth path: openapi.yaml operations: - method: POST path: "/signup" - method: POST # optional params for /token variants path: "/token" params: grant_type: password 7 features have no spec operation (client-side only or missing from spec): set_session, get_claims, on_auth_state_change, restore_session, mfa_get_aal, mfa_webauthn_update, admin_create_user. Co-Authored-By: Claude Sonnet 4.6 --- capabilities/auth/0001-sign-up.md | 6 ++++++ capabilities/auth/0002-sign-in-with-password.md | 8 ++++++++ capabilities/auth/0003-sign-in-with-otp.md | 6 ++++++ capabilities/auth/0004-sign-in-with-oauth.md | 6 ++++++ capabilities/auth/0005-sign-in-with-id-token.md | 8 ++++++++ capabilities/auth/0006-sign-in-with-sso.md | 6 ++++++ capabilities/auth/0007-sign-in-anonymously.md | 6 ++++++ capabilities/auth/0008-sign-in-with-web3.md | 8 ++++++++ capabilities/auth/0009-verify-otp.md | 8 ++++++++ capabilities/auth/0010-exchange-code-for-session.md | 8 ++++++++ capabilities/auth/0011-resend.md | 6 ++++++ capabilities/auth/0012-reauthenticate.md | 6 ++++++ capabilities/auth/0013-reset-password-for-email.md | 6 ++++++ capabilities/auth/0014-sign-in-with-passkey.md | 8 ++++++++ capabilities/auth/0015-register-passkey.md | 10 ++++++++++ capabilities/auth/0016-get-session.md | 8 ++++++++ capabilities/auth/0018-refresh-session.md | 8 ++++++++ capabilities/auth/0019-get-user.md | 6 ++++++ capabilities/auth/0020-update-user.md | 6 ++++++ capabilities/auth/0023-sign-out.md | 6 ++++++ capabilities/auth/0024-auto-refresh-token.md | 8 ++++++++ capabilities/auth/0026-get-user-identities.md | 6 ++++++ capabilities/auth/0027-link-identity.md | 6 ++++++ capabilities/auth/0028-unlink-identity.md | 6 ++++++ capabilities/auth/0029-mfa-enroll.md | 6 ++++++ capabilities/auth/0030-mfa-challenge.md | 6 ++++++ capabilities/auth/0031-mfa-verify.md | 6 ++++++ capabilities/auth/0032-mfa-challenge-and-verify.md | 8 ++++++++ capabilities/auth/0033-mfa-unenroll.md | 6 ++++++ capabilities/auth/0034-mfa-list-factors.md | 6 ++++++ .../auth/0036-mfa-webauthn-start-registration.md | 8 ++++++++ .../auth/0037-mfa-webauthn-verify-registration.md | 6 ++++++ .../auth/0038-mfa-webauthn-start-authentication.md | 6 ++++++ .../auth/0039-mfa-webauthn-verify-authentication.md | 6 ++++++ capabilities/auth/0040-mfa-webauthn-list.md | 6 ++++++ capabilities/auth/0042-mfa-webauthn-delete.md | 6 ++++++ .../auth/0043-oauth-get-authorization-details.md | 6 ++++++ capabilities/auth/0044-oauth-approve-authorization.md | 6 ++++++ capabilities/auth/0045-oauth-deny-authorization.md | 6 ++++++ capabilities/auth/0046-oauth-list-grants.md | 6 ++++++ capabilities/auth/0047-oauth-revoke-grant.md | 6 ++++++ capabilities/auth/0048-admin-sign-out.md | 6 ++++++ capabilities/auth/0049-admin-invite-user-by-email.md | 6 ++++++ capabilities/auth/0050-admin-generate-link.md | 6 ++++++ capabilities/auth/0052-admin-list-users.md | 6 ++++++ capabilities/auth/0053-admin-get-user-by-id.md | 6 ++++++ capabilities/auth/0054-admin-update-user-by-id.md | 6 ++++++ capabilities/auth/0055-admin-delete-user.md | 6 ++++++ capabilities/auth/0056-admin-mfa-list-factors.md | 6 ++++++ capabilities/auth/0057-admin-mfa-delete-factor.md | 6 ++++++ capabilities/auth/0058-admin-oauth-list-clients.md | 6 ++++++ capabilities/auth/0059-admin-oauth-create-client.md | 6 ++++++ capabilities/auth/0060-admin-oauth-get-client.md | 6 ++++++ capabilities/auth/0061-admin-oauth-update-client.md | 6 ++++++ capabilities/auth/0062-admin-oauth-delete-client.md | 6 ++++++ .../auth/0063-admin-oauth-regenerate-client-secret.md | 6 ++++++ 56 files changed, 362 insertions(+) diff --git a/capabilities/auth/0001-sign-up.md b/capabilities/auth/0001-sign-up.md index 030bbb14..443d5e5d 100644 --- a/capabilities/auth/0001-sign-up.md +++ b/capabilities/auth/0001-sign-up.md @@ -2,6 +2,12 @@ name: Sign Up description: Register a new user with email or phone and password. group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/signup" sdks: javascript: status: implemented diff --git a/capabilities/auth/0002-sign-in-with-password.md b/capabilities/auth/0002-sign-in-with-password.md index 39faeca9..0df27445 100644 --- a/capabilities/auth/0002-sign-in-with-password.md +++ b/capabilities/auth/0002-sign-in-with-password.md @@ -2,6 +2,14 @@ name: Sign In with Password description: Authenticate an existing user with email or phone and password. group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/token" + params: + grant_type: password sdks: javascript: status: implemented diff --git a/capabilities/auth/0003-sign-in-with-otp.md b/capabilities/auth/0003-sign-in-with-otp.md index 36cd3828..e45ef313 100644 --- a/capabilities/auth/0003-sign-in-with-otp.md +++ b/capabilities/auth/0003-sign-in-with-otp.md @@ -2,6 +2,12 @@ name: Sign In with OTP description: Send a one-time password (email or SMS) or magic link and authenticate with it. group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/otp" sdks: javascript: status: implemented diff --git a/capabilities/auth/0004-sign-in-with-oauth.md b/capabilities/auth/0004-sign-in-with-oauth.md index b9dad2eb..1e64718d 100644 --- a/capabilities/auth/0004-sign-in-with-oauth.md +++ b/capabilities/auth/0004-sign-in-with-oauth.md @@ -2,6 +2,12 @@ name: Sign In with OAuth description: Initiate a third-party OAuth sign-in flow (Google, GitHub, etc.). group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/authorize" sdks: javascript: status: implemented diff --git a/capabilities/auth/0005-sign-in-with-id-token.md b/capabilities/auth/0005-sign-in-with-id-token.md index 48d41c01..89313e8f 100644 --- a/capabilities/auth/0005-sign-in-with-id-token.md +++ b/capabilities/auth/0005-sign-in-with-id-token.md @@ -2,6 +2,14 @@ name: Sign In with ID Token description: Authenticate using a provider-issued ID token (e.g. from Apple or Google). group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/token" + params: + grant_type: id_token sdks: javascript: status: implemented diff --git a/capabilities/auth/0006-sign-in-with-sso.md b/capabilities/auth/0006-sign-in-with-sso.md index 7d7745da..1363cdf0 100644 --- a/capabilities/auth/0006-sign-in-with-sso.md +++ b/capabilities/auth/0006-sign-in-with-sso.md @@ -2,6 +2,12 @@ name: Sign In with SSO description: Sign in via SAML SSO by supplying a domain or provider ID. group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/sso" sdks: javascript: status: implemented diff --git a/capabilities/auth/0007-sign-in-anonymously.md b/capabilities/auth/0007-sign-in-anonymously.md index 5bc35b86..dc546052 100644 --- a/capabilities/auth/0007-sign-in-anonymously.md +++ b/capabilities/auth/0007-sign-in-anonymously.md @@ -2,6 +2,12 @@ name: Sign In Anonymously description: Create an anonymous (guest) session without user credentials. group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/signup" sdks: javascript: status: implemented diff --git a/capabilities/auth/0008-sign-in-with-web3.md b/capabilities/auth/0008-sign-in-with-web3.md index 5bd01dea..0c813bd0 100644 --- a/capabilities/auth/0008-sign-in-with-web3.md +++ b/capabilities/auth/0008-sign-in-with-web3.md @@ -2,6 +2,14 @@ name: Sign In with Web3 description: Authenticate using a Web3 wallet (Solana or Ethereum) via a signed message. group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/token" + params: + grant_type: web3 sdks: javascript: status: implemented diff --git a/capabilities/auth/0009-verify-otp.md b/capabilities/auth/0009-verify-otp.md index 50b95c46..8be269f8 100644 --- a/capabilities/auth/0009-verify-otp.md +++ b/capabilities/auth/0009-verify-otp.md @@ -2,6 +2,14 @@ name: Verify OTP description: Verify a one-time password or token hash to complete sign-in or email confirmation. group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/verify" + - method: POST + path: "/verify" sdks: javascript: status: implemented diff --git a/capabilities/auth/0010-exchange-code-for-session.md b/capabilities/auth/0010-exchange-code-for-session.md index 688333ba..f719c63c 100644 --- a/capabilities/auth/0010-exchange-code-for-session.md +++ b/capabilities/auth/0010-exchange-code-for-session.md @@ -2,6 +2,14 @@ name: Exchange Code for Session description: Exchange a PKCE authorization code for a user session. group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/token" + params: + grant_type: pkce sdks: javascript: status: implemented diff --git a/capabilities/auth/0011-resend.md b/capabilities/auth/0011-resend.md index 5299a7e3..1939586e 100644 --- a/capabilities/auth/0011-resend.md +++ b/capabilities/auth/0011-resend.md @@ -2,6 +2,12 @@ name: Resend Confirmation description: Resend a signup confirmation or OTP email/SMS to a user. group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/resend" sdks: javascript: status: implemented diff --git a/capabilities/auth/0012-reauthenticate.md b/capabilities/auth/0012-reauthenticate.md index 8a398d83..7183043f 100644 --- a/capabilities/auth/0012-reauthenticate.md +++ b/capabilities/auth/0012-reauthenticate.md @@ -2,6 +2,12 @@ name: Reauthenticate description: Send a reauthentication nonce to verify the user before sensitive operations such as password change. group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/reauthenticate" sdks: javascript: status: implemented diff --git a/capabilities/auth/0013-reset-password-for-email.md b/capabilities/auth/0013-reset-password-for-email.md index ceb22c9f..bd1a78c6 100644 --- a/capabilities/auth/0013-reset-password-for-email.md +++ b/capabilities/auth/0013-reset-password-for-email.md @@ -2,6 +2,12 @@ name: Reset Password for Email description: Send a password-reset email to a user. group: sign-in +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/recover" sdks: javascript: status: implemented diff --git a/capabilities/auth/0014-sign-in-with-passkey.md b/capabilities/auth/0014-sign-in-with-passkey.md index 9d81dec8..2f91903f 100644 --- a/capabilities/auth/0014-sign-in-with-passkey.md +++ b/capabilities/auth/0014-sign-in-with-passkey.md @@ -2,6 +2,14 @@ name: Sign In with Passkey description: Authenticate using a WebAuthn passkey registered on the device. group: passkey +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/factors/{factorId}/challenge" + - method: POST + path: "/factors/{factorId}/verify" sdks: javascript: status: implemented diff --git a/capabilities/auth/0015-register-passkey.md b/capabilities/auth/0015-register-passkey.md index 464c9a7e..6a88956e 100644 --- a/capabilities/auth/0015-register-passkey.md +++ b/capabilities/auth/0015-register-passkey.md @@ -2,6 +2,16 @@ name: Register Passkey description: Register a new WebAuthn passkey for the currently authenticated user. group: passkey +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/factors" + params: + factor_type: webauthn + - method: POST + path: "/factors/{factorId}/verify" sdks: javascript: status: implemented diff --git a/capabilities/auth/0016-get-session.md b/capabilities/auth/0016-get-session.md index d73c7095..6f04fb89 100644 --- a/capabilities/auth/0016-get-session.md +++ b/capabilities/auth/0016-get-session.md @@ -2,6 +2,14 @@ name: Get Session description: Return the current active session, refreshing the access token if needed. group: session +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/token" + params: + grant_type: refresh_token sdks: javascript: status: implemented diff --git a/capabilities/auth/0018-refresh-session.md b/capabilities/auth/0018-refresh-session.md index da36f985..00e09edb 100644 --- a/capabilities/auth/0018-refresh-session.md +++ b/capabilities/auth/0018-refresh-session.md @@ -2,6 +2,14 @@ name: Refresh Session description: Force an immediate refresh of the current session using the refresh token. group: session +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/token" + params: + grant_type: refresh_token sdks: javascript: status: implemented diff --git a/capabilities/auth/0019-get-user.md b/capabilities/auth/0019-get-user.md index 3a3396a3..1d84c617 100644 --- a/capabilities/auth/0019-get-user.md +++ b/capabilities/auth/0019-get-user.md @@ -2,6 +2,12 @@ name: Get User description: Fetch the authenticated user's profile from the server, verifying the JWT. group: session +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/user" sdks: javascript: status: implemented diff --git a/capabilities/auth/0020-update-user.md b/capabilities/auth/0020-update-user.md index a48812b5..35eef72f 100644 --- a/capabilities/auth/0020-update-user.md +++ b/capabilities/auth/0020-update-user.md @@ -2,6 +2,12 @@ name: Update User description: Update the current user's attributes such as email, password, or metadata. group: session +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: PUT + path: "/user" sdks: javascript: status: implemented diff --git a/capabilities/auth/0023-sign-out.md b/capabilities/auth/0023-sign-out.md index 84648405..a7418f0e 100644 --- a/capabilities/auth/0023-sign-out.md +++ b/capabilities/auth/0023-sign-out.md @@ -2,6 +2,12 @@ name: Sign Out description: Revoke the current user session and clear stored credentials. group: session +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/logout" sdks: javascript: status: implemented diff --git a/capabilities/auth/0024-auto-refresh-token.md b/capabilities/auth/0024-auto-refresh-token.md index 4e722b8b..55606d74 100644 --- a/capabilities/auth/0024-auto-refresh-token.md +++ b/capabilities/auth/0024-auto-refresh-token.md @@ -2,6 +2,14 @@ name: Auto Refresh Token description: SDK automatically refreshes the access token in the background before it expires; exposes hooks to start and stop the refresh loop. group: session +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/token" + params: + grant_type: refresh_token sdks: javascript: status: implemented diff --git a/capabilities/auth/0026-get-user-identities.md b/capabilities/auth/0026-get-user-identities.md index 948dc6ab..3301ed34 100644 --- a/capabilities/auth/0026-get-user-identities.md +++ b/capabilities/auth/0026-get-user-identities.md @@ -2,6 +2,12 @@ name: Get User Identities description: List all external identities linked to the current user's account. group: identities +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/user" sdks: javascript: status: implemented diff --git a/capabilities/auth/0027-link-identity.md b/capabilities/auth/0027-link-identity.md index d68b0081..47fba480 100644 --- a/capabilities/auth/0027-link-identity.md +++ b/capabilities/auth/0027-link-identity.md @@ -2,6 +2,12 @@ name: Link Identity description: Link an additional OAuth or ID-token identity to the current user's account. group: identities +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/user/identities/authorize" sdks: javascript: status: implemented diff --git a/capabilities/auth/0028-unlink-identity.md b/capabilities/auth/0028-unlink-identity.md index fe6ded8a..47e156d1 100644 --- a/capabilities/auth/0028-unlink-identity.md +++ b/capabilities/auth/0028-unlink-identity.md @@ -2,6 +2,12 @@ name: Unlink Identity description: Remove a linked identity from the current user's account. group: identities +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: DELETE + path: "/user/identities/{identityId}" sdks: javascript: status: implemented diff --git a/capabilities/auth/0029-mfa-enroll.md b/capabilities/auth/0029-mfa-enroll.md index b1801ea4..cd4fb7de 100644 --- a/capabilities/auth/0029-mfa-enroll.md +++ b/capabilities/auth/0029-mfa-enroll.md @@ -2,6 +2,12 @@ name: MFA Enroll description: Enroll a new MFA factor (TOTP or phone) for the current user. group: mfa +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/factors" sdks: javascript: status: implemented diff --git a/capabilities/auth/0030-mfa-challenge.md b/capabilities/auth/0030-mfa-challenge.md index 01e19326..dbd5190f 100644 --- a/capabilities/auth/0030-mfa-challenge.md +++ b/capabilities/auth/0030-mfa-challenge.md @@ -2,6 +2,12 @@ name: MFA Challenge description: Create a challenge for an enrolled MFA factor to begin the verification flow. group: mfa +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/factors/{factorId}/challenge" sdks: javascript: status: implemented diff --git a/capabilities/auth/0031-mfa-verify.md b/capabilities/auth/0031-mfa-verify.md index d71db9bb..5a3dc43b 100644 --- a/capabilities/auth/0031-mfa-verify.md +++ b/capabilities/auth/0031-mfa-verify.md @@ -2,6 +2,12 @@ name: MFA Verify description: Verify a code against an active MFA challenge to complete second-factor authentication. group: mfa +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/factors/{factorId}/verify" sdks: javascript: status: implemented diff --git a/capabilities/auth/0032-mfa-challenge-and-verify.md b/capabilities/auth/0032-mfa-challenge-and-verify.md index d4168cc4..450ebf1c 100644 --- a/capabilities/auth/0032-mfa-challenge-and-verify.md +++ b/capabilities/auth/0032-mfa-challenge-and-verify.md @@ -2,6 +2,14 @@ name: MFA Challenge and Verify description: Create a challenge and verify a code in a single call for convenience. group: mfa +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/factors/{factorId}/challenge" + - method: POST + path: "/factors/{factorId}/verify" sdks: javascript: status: implemented diff --git a/capabilities/auth/0033-mfa-unenroll.md b/capabilities/auth/0033-mfa-unenroll.md index a29c5a72..0c1f8f19 100644 --- a/capabilities/auth/0033-mfa-unenroll.md +++ b/capabilities/auth/0033-mfa-unenroll.md @@ -2,6 +2,12 @@ name: MFA Unenroll description: Remove an enrolled MFA factor from the current user's account. group: mfa +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: DELETE + path: "/factors/{factorId}" sdks: javascript: status: implemented diff --git a/capabilities/auth/0034-mfa-list-factors.md b/capabilities/auth/0034-mfa-list-factors.md index c2596b9b..1591c0d7 100644 --- a/capabilities/auth/0034-mfa-list-factors.md +++ b/capabilities/auth/0034-mfa-list-factors.md @@ -2,6 +2,12 @@ name: MFA List Factors description: List all MFA factors enrolled for the current user. group: mfa +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/user" sdks: javascript: status: implemented diff --git a/capabilities/auth/0036-mfa-webauthn-start-registration.md b/capabilities/auth/0036-mfa-webauthn-start-registration.md index 10471cf0..09065369 100644 --- a/capabilities/auth/0036-mfa-webauthn-start-registration.md +++ b/capabilities/auth/0036-mfa-webauthn-start-registration.md @@ -2,6 +2,14 @@ name: MFA WebAuthn Start Registration description: Begin WebAuthn authenticator registration by generating credential creation options. group: mfa-webauthn +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/factors" + params: + factor_type: webauthn sdks: javascript: status: implemented diff --git a/capabilities/auth/0037-mfa-webauthn-verify-registration.md b/capabilities/auth/0037-mfa-webauthn-verify-registration.md index f5841b70..35bdd702 100644 --- a/capabilities/auth/0037-mfa-webauthn-verify-registration.md +++ b/capabilities/auth/0037-mfa-webauthn-verify-registration.md @@ -2,6 +2,12 @@ name: MFA WebAuthn Verify Registration description: Complete WebAuthn authenticator registration by verifying the credential response. group: mfa-webauthn +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/factors/{factorId}/verify" sdks: javascript: status: implemented diff --git a/capabilities/auth/0038-mfa-webauthn-start-authentication.md b/capabilities/auth/0038-mfa-webauthn-start-authentication.md index 94288147..d5bce2c9 100644 --- a/capabilities/auth/0038-mfa-webauthn-start-authentication.md +++ b/capabilities/auth/0038-mfa-webauthn-start-authentication.md @@ -2,6 +2,12 @@ name: MFA WebAuthn Start Authentication description: Begin WebAuthn authentication by generating assertion options for an enrolled authenticator. group: mfa-webauthn +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/factors/{factorId}/challenge" sdks: javascript: status: implemented diff --git a/capabilities/auth/0039-mfa-webauthn-verify-authentication.md b/capabilities/auth/0039-mfa-webauthn-verify-authentication.md index a10f2242..87116324 100644 --- a/capabilities/auth/0039-mfa-webauthn-verify-authentication.md +++ b/capabilities/auth/0039-mfa-webauthn-verify-authentication.md @@ -2,6 +2,12 @@ name: MFA WebAuthn Verify Authentication description: Complete WebAuthn authentication by verifying the assertion response. group: mfa-webauthn +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/factors/{factorId}/verify" sdks: javascript: status: implemented diff --git a/capabilities/auth/0040-mfa-webauthn-list.md b/capabilities/auth/0040-mfa-webauthn-list.md index c4969763..fc97aba4 100644 --- a/capabilities/auth/0040-mfa-webauthn-list.md +++ b/capabilities/auth/0040-mfa-webauthn-list.md @@ -2,6 +2,12 @@ name: MFA WebAuthn List Authenticators description: List all WebAuthn authenticators registered for the current user. group: mfa-webauthn +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/user" sdks: javascript: status: implemented diff --git a/capabilities/auth/0042-mfa-webauthn-delete.md b/capabilities/auth/0042-mfa-webauthn-delete.md index 02a4dc5c..038e0d78 100644 --- a/capabilities/auth/0042-mfa-webauthn-delete.md +++ b/capabilities/auth/0042-mfa-webauthn-delete.md @@ -2,6 +2,12 @@ name: MFA WebAuthn Delete Authenticator description: Remove a registered WebAuthn authenticator from the current user's account. group: mfa-webauthn +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: DELETE + path: "/factors/{factorId}" sdks: javascript: status: implemented diff --git a/capabilities/auth/0043-oauth-get-authorization-details.md b/capabilities/auth/0043-oauth-get-authorization-details.md index b7effebf..2a3f46ca 100644 --- a/capabilities/auth/0043-oauth-get-authorization-details.md +++ b/capabilities/auth/0043-oauth-get-authorization-details.md @@ -2,6 +2,12 @@ name: OAuth Get Authorization Details description: Fetch the details of a pending OAuth authorization request (for consent screens). group: oauth-server +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/oauth/authorizations/{authorization_id}" sdks: javascript: status: implemented diff --git a/capabilities/auth/0044-oauth-approve-authorization.md b/capabilities/auth/0044-oauth-approve-authorization.md index 1ebb5254..30ec7cf7 100644 --- a/capabilities/auth/0044-oauth-approve-authorization.md +++ b/capabilities/auth/0044-oauth-approve-authorization.md @@ -2,6 +2,12 @@ name: OAuth Approve Authorization description: Approve a pending OAuth authorization request on behalf of the current user. group: oauth-server +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/oauth/authorizations/{authorization_id}/consent" sdks: javascript: status: implemented diff --git a/capabilities/auth/0045-oauth-deny-authorization.md b/capabilities/auth/0045-oauth-deny-authorization.md index 82b326f2..0ed83d48 100644 --- a/capabilities/auth/0045-oauth-deny-authorization.md +++ b/capabilities/auth/0045-oauth-deny-authorization.md @@ -2,6 +2,12 @@ name: OAuth Deny Authorization description: Deny a pending OAuth authorization request on behalf of the current user. group: oauth-server +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/oauth/authorizations/{authorization_id}/consent" sdks: javascript: status: implemented diff --git a/capabilities/auth/0046-oauth-list-grants.md b/capabilities/auth/0046-oauth-list-grants.md index 70809cde..c70e9926 100644 --- a/capabilities/auth/0046-oauth-list-grants.md +++ b/capabilities/auth/0046-oauth-list-grants.md @@ -2,6 +2,12 @@ name: OAuth List Grants description: List all active OAuth grants the current user has approved. group: oauth-server +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/user/oauth/grants" sdks: javascript: status: implemented diff --git a/capabilities/auth/0047-oauth-revoke-grant.md b/capabilities/auth/0047-oauth-revoke-grant.md index 6c8f4b88..022a8284 100644 --- a/capabilities/auth/0047-oauth-revoke-grant.md +++ b/capabilities/auth/0047-oauth-revoke-grant.md @@ -2,6 +2,12 @@ name: OAuth Revoke Grant description: Revoke a specific OAuth grant that the current user previously approved. group: oauth-server +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: DELETE + path: "/user/oauth/grants" sdks: javascript: status: implemented diff --git a/capabilities/auth/0048-admin-sign-out.md b/capabilities/auth/0048-admin-sign-out.md index 285dd882..ee53333a 100644 --- a/capabilities/auth/0048-admin-sign-out.md +++ b/capabilities/auth/0048-admin-sign-out.md @@ -2,6 +2,12 @@ name: Admin Sign Out description: Revoke a user's session server-side by their access token (requires service role). group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/logout" sdks: javascript: status: implemented diff --git a/capabilities/auth/0049-admin-invite-user-by-email.md b/capabilities/auth/0049-admin-invite-user-by-email.md index b7f6aa85..014f720a 100644 --- a/capabilities/auth/0049-admin-invite-user-by-email.md +++ b/capabilities/auth/0049-admin-invite-user-by-email.md @@ -2,6 +2,12 @@ name: Admin Invite User by Email description: Send an invite email to a new user (requires service role). group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/invite" sdks: javascript: status: implemented diff --git a/capabilities/auth/0050-admin-generate-link.md b/capabilities/auth/0050-admin-generate-link.md index 55a2045f..f3d10635 100644 --- a/capabilities/auth/0050-admin-generate-link.md +++ b/capabilities/auth/0050-admin-generate-link.md @@ -2,6 +2,12 @@ name: Admin Generate Link description: Generate an email action link (confirmation, magic link, recovery) for a user. group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/admin/generate_link" sdks: javascript: status: implemented diff --git a/capabilities/auth/0052-admin-list-users.md b/capabilities/auth/0052-admin-list-users.md index bf2d6f24..816f8aa6 100644 --- a/capabilities/auth/0052-admin-list-users.md +++ b/capabilities/auth/0052-admin-list-users.md @@ -2,6 +2,12 @@ name: Admin List Users description: Retrieve a paginated list of all users in the project. group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/admin/users" sdks: javascript: status: implemented diff --git a/capabilities/auth/0053-admin-get-user-by-id.md b/capabilities/auth/0053-admin-get-user-by-id.md index f107b996..a0a46a25 100644 --- a/capabilities/auth/0053-admin-get-user-by-id.md +++ b/capabilities/auth/0053-admin-get-user-by-id.md @@ -2,6 +2,12 @@ name: Admin Get User by ID description: Fetch a single user's profile and metadata by their UUID. group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/admin/users/{userId}" sdks: javascript: status: implemented diff --git a/capabilities/auth/0054-admin-update-user-by-id.md b/capabilities/auth/0054-admin-update-user-by-id.md index 703c2d8e..8a79055f 100644 --- a/capabilities/auth/0054-admin-update-user-by-id.md +++ b/capabilities/auth/0054-admin-update-user-by-id.md @@ -2,6 +2,12 @@ name: Admin Update User by ID description: Update a user's attributes (email, password, metadata, role, etc.) by their UUID. group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: PUT + path: "/admin/users/{userId}" sdks: javascript: status: implemented diff --git a/capabilities/auth/0055-admin-delete-user.md b/capabilities/auth/0055-admin-delete-user.md index c26cfff9..947c497c 100644 --- a/capabilities/auth/0055-admin-delete-user.md +++ b/capabilities/auth/0055-admin-delete-user.md @@ -2,6 +2,12 @@ name: Admin Delete User description: Permanently delete a user by their UUID (hard or soft delete). group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: DELETE + path: "/admin/users/{userId}" sdks: javascript: status: implemented diff --git a/capabilities/auth/0056-admin-mfa-list-factors.md b/capabilities/auth/0056-admin-mfa-list-factors.md index 6bf054c6..853ac7fc 100644 --- a/capabilities/auth/0056-admin-mfa-list-factors.md +++ b/capabilities/auth/0056-admin-mfa-list-factors.md @@ -2,6 +2,12 @@ name: Admin MFA List Factors description: List all MFA factors enrolled for a specific user (requires service role). group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/admin/users/{userId}/factors" sdks: javascript: status: implemented diff --git a/capabilities/auth/0057-admin-mfa-delete-factor.md b/capabilities/auth/0057-admin-mfa-delete-factor.md index 53ebe10f..8ea8cdf9 100644 --- a/capabilities/auth/0057-admin-mfa-delete-factor.md +++ b/capabilities/auth/0057-admin-mfa-delete-factor.md @@ -2,6 +2,12 @@ name: Admin MFA Delete Factor description: Delete a specific MFA factor from a user's account (requires service role). group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: DELETE + path: "/admin/users/{userId}/factors/{factorId}" sdks: javascript: status: implemented diff --git a/capabilities/auth/0058-admin-oauth-list-clients.md b/capabilities/auth/0058-admin-oauth-list-clients.md index 12785f4c..ff06126c 100644 --- a/capabilities/auth/0058-admin-oauth-list-clients.md +++ b/capabilities/auth/0058-admin-oauth-list-clients.md @@ -2,6 +2,12 @@ name: Admin OAuth List Clients description: List all registered OAuth clients for the project (requires service role). group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/admin/oauth/clients" sdks: javascript: status: implemented diff --git a/capabilities/auth/0059-admin-oauth-create-client.md b/capabilities/auth/0059-admin-oauth-create-client.md index 4c3bacbe..e7c995b1 100644 --- a/capabilities/auth/0059-admin-oauth-create-client.md +++ b/capabilities/auth/0059-admin-oauth-create-client.md @@ -2,6 +2,12 @@ name: Admin OAuth Create Client description: Register a new OAuth client application for the project (requires service role). group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/admin/oauth/clients" sdks: javascript: status: implemented diff --git a/capabilities/auth/0060-admin-oauth-get-client.md b/capabilities/auth/0060-admin-oauth-get-client.md index 032bc968..f669071f 100644 --- a/capabilities/auth/0060-admin-oauth-get-client.md +++ b/capabilities/auth/0060-admin-oauth-get-client.md @@ -2,6 +2,12 @@ name: Admin OAuth Get Client description: Retrieve details of a specific OAuth client by its client ID. group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: GET + path: "/admin/oauth/clients/{client_id}" sdks: javascript: status: implemented diff --git a/capabilities/auth/0061-admin-oauth-update-client.md b/capabilities/auth/0061-admin-oauth-update-client.md index 6585ca93..e9fe2c87 100644 --- a/capabilities/auth/0061-admin-oauth-update-client.md +++ b/capabilities/auth/0061-admin-oauth-update-client.md @@ -2,6 +2,12 @@ name: Admin OAuth Update Client description: Update a registered OAuth client's settings (name, redirect URIs, etc.). group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: PUT + path: "/admin/oauth/clients/{client_id}" sdks: javascript: status: implemented diff --git a/capabilities/auth/0062-admin-oauth-delete-client.md b/capabilities/auth/0062-admin-oauth-delete-client.md index 56512cf7..7744f575 100644 --- a/capabilities/auth/0062-admin-oauth-delete-client.md +++ b/capabilities/auth/0062-admin-oauth-delete-client.md @@ -2,6 +2,12 @@ name: Admin OAuth Delete Client description: Remove a registered OAuth client from the project. group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: DELETE + path: "/admin/oauth/clients/{client_id}" sdks: javascript: status: implemented diff --git a/capabilities/auth/0063-admin-oauth-regenerate-client-secret.md b/capabilities/auth/0063-admin-oauth-regenerate-client-secret.md index 9e9ab65a..51098169 100644 --- a/capabilities/auth/0063-admin-oauth-regenerate-client-secret.md +++ b/capabilities/auth/0063-admin-oauth-regenerate-client-secret.md @@ -2,6 +2,12 @@ name: Admin OAuth Regenerate Client Secret description: Regenerate the client secret for a registered OAuth application. group: admin +openapi: + repo: supabase/auth + path: openapi.yaml + operations: + - method: POST + path: "/admin/oauth/clients/{client_id}/regenerate_secret" sdks: javascript: status: implemented From 41da7ce8532724c0f669dcc9b2ce3a70ef55acad Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Tue, 9 Jun 2026 16:24:48 -0300 Subject: [PATCH 03/36] refactor: move openapi operations from frontmatter into body ## API section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The openapi: frontmatter field is replaced by a ## API section in the markdown body, keeping all spec/documentation content in the body and all structured matrix data in the frontmatter. Format in body: ## API Spec: https://github.com/supabase/auth/blob/master/openapi.yaml - `POST /signup` - `POST /token` — `grant_type=password` TEMPLATE.md updated to include ## API as the first body section (optional — omit for client-side-only features). Co-Authored-By: Claude Sonnet 4.6 --- capabilities/TEMPLATE.md | 10 ++++++++++ capabilities/auth/0001-sign-up.md | 12 ++++++------ capabilities/auth/0002-sign-in-with-password.md | 14 ++++++-------- capabilities/auth/0003-sign-in-with-otp.md | 12 ++++++------ capabilities/auth/0004-sign-in-with-oauth.md | 12 ++++++------ capabilities/auth/0005-sign-in-with-id-token.md | 14 ++++++-------- capabilities/auth/0006-sign-in-with-sso.md | 12 ++++++------ capabilities/auth/0007-sign-in-anonymously.md | 12 ++++++------ capabilities/auth/0008-sign-in-with-web3.md | 14 ++++++-------- capabilities/auth/0009-verify-otp.md | 15 +++++++-------- .../auth/0010-exchange-code-for-session.md | 14 ++++++-------- capabilities/auth/0011-resend.md | 12 ++++++------ capabilities/auth/0012-reauthenticate.md | 12 ++++++------ .../auth/0013-reset-password-for-email.md | 12 ++++++------ capabilities/auth/0014-sign-in-with-passkey.md | 15 +++++++-------- capabilities/auth/0015-register-passkey.md | 17 +++++++---------- capabilities/auth/0016-get-session.md | 14 ++++++-------- capabilities/auth/0018-refresh-session.md | 14 ++++++-------- capabilities/auth/0019-get-user.md | 12 ++++++------ capabilities/auth/0020-update-user.md | 12 ++++++------ capabilities/auth/0023-sign-out.md | 12 ++++++------ capabilities/auth/0024-auto-refresh-token.md | 14 ++++++-------- capabilities/auth/0026-get-user-identities.md | 12 ++++++------ capabilities/auth/0027-link-identity.md | 12 ++++++------ capabilities/auth/0028-unlink-identity.md | 12 ++++++------ capabilities/auth/0029-mfa-enroll.md | 12 ++++++------ capabilities/auth/0030-mfa-challenge.md | 12 ++++++------ capabilities/auth/0031-mfa-verify.md | 12 ++++++------ .../auth/0032-mfa-challenge-and-verify.md | 15 +++++++-------- capabilities/auth/0033-mfa-unenroll.md | 12 ++++++------ capabilities/auth/0034-mfa-list-factors.md | 12 ++++++------ .../0036-mfa-webauthn-start-registration.md | 14 ++++++-------- .../0037-mfa-webauthn-verify-registration.md | 12 ++++++------ .../0038-mfa-webauthn-start-authentication.md | 12 ++++++------ .../0039-mfa-webauthn-verify-authentication.md | 12 ++++++------ capabilities/auth/0040-mfa-webauthn-list.md | 12 ++++++------ capabilities/auth/0042-mfa-webauthn-delete.md | 12 ++++++------ .../0043-oauth-get-authorization-details.md | 12 ++++++------ .../auth/0044-oauth-approve-authorization.md | 12 ++++++------ .../auth/0045-oauth-deny-authorization.md | 12 ++++++------ capabilities/auth/0046-oauth-list-grants.md | 12 ++++++------ capabilities/auth/0047-oauth-revoke-grant.md | 12 ++++++------ capabilities/auth/0048-admin-sign-out.md | 12 ++++++------ .../auth/0049-admin-invite-user-by-email.md | 12 ++++++------ capabilities/auth/0050-admin-generate-link.md | 12 ++++++------ capabilities/auth/0052-admin-list-users.md | 12 ++++++------ capabilities/auth/0053-admin-get-user-by-id.md | 12 ++++++------ .../auth/0054-admin-update-user-by-id.md | 12 ++++++------ capabilities/auth/0055-admin-delete-user.md | 12 ++++++------ .../auth/0056-admin-mfa-list-factors.md | 12 ++++++------ .../auth/0057-admin-mfa-delete-factor.md | 12 ++++++------ .../auth/0058-admin-oauth-list-clients.md | 12 ++++++------ .../auth/0059-admin-oauth-create-client.md | 12 ++++++------ .../auth/0060-admin-oauth-get-client.md | 12 ++++++------ .../auth/0061-admin-oauth-update-client.md | 12 ++++++------ .../auth/0062-admin-oauth-delete-client.md | 12 ++++++------ ...0063-admin-oauth-regenerate-client-secret.md | 12 ++++++------ 57 files changed, 350 insertions(+), 362 deletions(-) diff --git a/capabilities/TEMPLATE.md b/capabilities/TEMPLATE.md index 80f82d56..d52e0d3b 100644 --- a/capabilities/TEMPLATE.md +++ b/capabilities/TEMPLATE.md @@ -11,6 +11,16 @@ sdks: symbols: [symbolName] --- +## API + + + +Spec: [https://github.com/supabase/auth/blob/master/openapi.yaml](https://github.com/supabase/auth/blob/master/openapi.yaml) + +- `METHOD /path` + ## Behavior ## API diff --git a/capabilities/auth/0001-sign-up.md b/specs/auth/sign_up.md similarity index 85% rename from capabilities/auth/0001-sign-up.md rename to specs/auth/sign_up.md index e3c1518c..9574e236 100644 --- a/capabilities/auth/0001-sign-up.md +++ b/specs/auth/sign_up.md @@ -1,15 +1,4 @@ ---- -name: Sign Up -description: Register a new user with email or phone and password. -group: sign-in -sdks: - javascript: - status: implemented - references: - - repo: supabase/supabase-js - path: packages/core/auth-js/src/GoTrueClient.ts - symbols: [signUp] ---- +# Sign Up ## API From eca1c7ce5b3bf67155e57125c9b960db3556826a Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Wed, 10 Jun 2026 09:27:41 -0300 Subject: [PATCH 05/36] docs: add SDK compliance per-repo design spec Draft design for moving SDK compliance data out of the central capabilities YAML and into each SDK's own repository. Key decisions: - supabase-capabilities.yaml at root of each SDK repo (sparse, flat) - Reusable GitHub Actions validation workflow published from this repo - Hourly aggregation workflow fetches compliance via GitHub API - Central YAML becomes pure feature registry (no sdks: block) - No SDK repos touched until team review Co-Authored-By: Claude Sonnet 4.6 --- docs/2026-06-10-sdk-compliance-design.md | 167 +++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 docs/2026-06-10-sdk-compliance-design.md diff --git a/docs/2026-06-10-sdk-compliance-design.md b/docs/2026-06-10-sdk-compliance-design.md new file mode 100644 index 00000000..44b77ac8 --- /dev/null +++ b/docs/2026-06-10-sdk-compliance-design.md @@ -0,0 +1,167 @@ +# SDK Compliance Per-Repo Design + +**Date:** 2026-06-10 +**Status:** Draft — pending team review + +## Problem + +SDK compliance data (which features each SDK has implemented) currently lives in this repo's +`capabilities/*.yaml` files inside each feature's `sdks:` block. This creates friction: when an SDK +developer implements a feature, they must open a second PR in this repo to mark it implemented. The +two changes are not atomic, and the compliance data drifts over time. + +## Goal + +SDK compliance is declared in each SDK's own repository and can be updated in the same PR that +implements the feature. This repo becomes a pure feature registry. A scheduled workflow aggregates +compliance from all SDK repos and rebuilds the matrix. + +## Compliance File Format + +Each SDK repo places a `supabase-capabilities.yaml` at its root: + +```yaml +# supabase-capabilities.yaml +# Canonical spec: https://github.com/supabase/sdk +sdk: javascript + +features: + # Simple scalar for most statuses + auth.sign_up: implemented + auth.sign_in_with_password: implemented + + # Map form when a note is needed (required for partially_implemented) + auth.mfa_enroll: + status: partially_implemented + note: "TOTP only — phone factor not yet supported" + + # note is also allowed on other statuses + auth.sign_in_with_passkey: + status: not_implemented + note: "Blocked on platform WebAuthn support" + + # Unlisted features default to not_implemented +``` + +### Valid statuses + +| Status | Note required | +|---|---| +| `implemented` | no (optional) | +| `not_implemented` | no (optional) | +| `not_applicable` | no (optional) | +| `partially_implemented` | **yes** | + +### Rules + +- Unlisted features default to `not_implemented` — the file can start sparse and grow incrementally +- `note` is allowed on any status; required only on `partially_implemented` +- Feature IDs must match exactly the canonical IDs defined in `capabilities/*.yaml` + +## Reusable Validation Workflow + +This repo publishes a reusable GitHub Actions workflow. SDK repos call it with one line: + +```yaml +# .github/workflows/validate-capabilities.yml (in each SDK repo) +on: [pull_request] +jobs: + validate: + uses: supabase/sdk/.github/workflows/validate-capabilities.yml@main + with: + file: supabase-capabilities.yaml # default, optional +``` + +### What it validates + +1. All declared feature IDs exist in the canonical spec → fail if unknown +2. All status values are valid → fail if unrecognised value +3. `partially_implemented` without `note` → fail +4. YAML is well-formed → fail if parse error + +The workflow fetches `capabilities/*.yaml` from this repo at `main` on every run — always validates +against the current spec, no version pinning. + +## Aggregation Workflow + +A scheduled workflow in this repo (`aggregate-capabilities.yml`) runs hourly and on +`workflow_dispatch`: + +```yaml +on: + schedule: + - cron: '0 * * * *' + workflow_dispatch: +``` + +### Steps + +1. Fetch `supabase-capabilities.yaml` from each SDK repo via the GitHub API +2. Load canonical feature list from `capabilities/*.yaml` +3. For each feature, merge compliance entries — unlisted = `not_implemented` +4. Pass merged data to the existing site generator to rebuild the matrix +5. Deploy to GitHub Pages + +### SDK repo registry + +Hardcoded in the workflow — a small list that rarely changes: + +``` +supabase/supabase-js → javascript +supabase/supabase-flutter → flutter +supabase/supabase-py → python +supabase/supabase-swift → swift +supabase/postgrest-csharp → csharp +supabase/postgrest-go → go +supabase/supabase-kt → kotlin +``` + +If a repo has no compliance file, all its features are treated as `not_implemented` — the workflow +does not fail. + +The aggregation workflow uses the default `GITHUB_TOKEN`. All SDK repos are public so no additional +permissions are needed. Exact repo slugs should be verified against actual GitHub org names before +implementation. + +## Central YAML Changes + +The `sdks:` block is removed from every feature in `capabilities/*.yaml`. Features become: + +```yaml +# before +- id: auth.sign_up + name: Sign Up + description: Register a new user with email or phone and password. + group: sign-in + sdks: + javascript: { status: implemented, references: [...] } + flutter: { status: not_implemented } + ... + +# after +- id: auth.sign_up + name: Sign Up + description: Register a new user with email or phone and password. + group: sign-in +``` + +The JSON schema (`schema/capability-matrix.schema.json`) and TypeScript types +(`scripts/capability-matrix/src/types.ts`) are updated accordingly. The site generator is updated +to consume aggregated compliance data at build time rather than reading it from the YAML. + +## Implementation Order + +1. Strip `sdks:` from capability YAMLs, update schema and TypeScript types, update site generator + to accept externally-supplied compliance data +2. Add the reusable validation workflow (`.github/workflows/validate-capabilities.yml`) +3. Add the aggregation workflow (`.github/workflows/aggregate-capabilities.yml`) +4. SDK repos add their `supabase-capabilities.yaml` independently when ready + +No SDK repo is touched as part of this implementation. The matrix will show all SDKs as +`not_implemented` until each SDK team adds their compliance file. + +## Out of Scope + +- Bootstrapping `supabase-capabilities.yaml` in any SDK repo +- Version pinning between the spec and compliance files +- Source code references (file paths, symbol names) in compliance files — status only for now From 79d740849f7a6b74942b5692201e020ae25b9a2e Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Wed, 10 Jun 2026 09:46:51 -0300 Subject: [PATCH 06/36] feat: add partially_implemented status and compliance types; retire SdkEntry --- scripts/capability-matrix/src/types.ts | 32 +++++++++++--------- scripts/capability-matrix/test/types.test.ts | 4 +-- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/scripts/capability-matrix/src/types.ts b/scripts/capability-matrix/src/types.ts index 3dfc5fc8..d0526ef4 100644 --- a/scripts/capability-matrix/src/types.ts +++ b/scripts/capability-matrix/src/types.ts @@ -9,21 +9,17 @@ export const LANGUAGES = [ ] as const; export type Language = (typeof LANGUAGES)[number]; -export const STATUSES = ["implemented", "not_implemented", "not_applicable"] as const; +export const STATUSES = [ + "implemented", + "partially_implemented", + "not_implemented", + "not_applicable", +] as const; export type Status = (typeof STATUSES)[number]; -export interface Reference { - repo: string; - path: string; - symbols?: string[]; - ref?: string; -} - -export interface SdkEntry { - status: Status; - since?: string; - notes?: string; - references?: Reference[]; +export interface Group { + id: string; + title: string; } export interface Feature { @@ -31,13 +27,13 @@ export interface Feature { name: string; description: string; group?: string; - sdks: Record; } export interface AreaFile { area: string; title: string; description: string; + groups?: Group[]; features: Feature[]; } @@ -51,3 +47,11 @@ export interface Finding { file: string; message: string; } + +export interface ComplianceEntry { + status: Status; + note?: string; +} + +// Feature ID → ComplianceEntry (sparse; unlisted features default to not_implemented) +export type ComplianceMap = Record; diff --git a/scripts/capability-matrix/test/types.test.ts b/scripts/capability-matrix/test/types.test.ts index 827f681a..4eb7afb6 100644 --- a/scripts/capability-matrix/test/types.test.ts +++ b/scripts/capability-matrix/test/types.test.ts @@ -8,9 +8,9 @@ describe("constants", () => { ); }); - it("defines the three status values", () => { + it("defines the four status values", () => { expect([...STATUSES].sort()).toEqual( - ["implemented", "not_applicable", "not_implemented"] + ["implemented", "not_applicable", "not_implemented", "partially_implemented"] ); }); }); From 1a26761bfaa4f987afe763d14787c5f97c647ecd Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Wed, 10 Jun 2026 09:49:37 -0300 Subject: [PATCH 07/36] refactor: remove sdks from capability feature schema, add optional groups --- schema/capability-matrix.schema.json | 69 ++++-------------- scripts/capability-matrix/test/schema.test.ts | 72 +++++++++---------- 2 files changed, 50 insertions(+), 91 deletions(-) diff --git a/schema/capability-matrix.schema.json b/schema/capability-matrix.schema.json index a3823251..6b632d05 100644 --- a/schema/capability-matrix.schema.json +++ b/schema/capability-matrix.schema.json @@ -9,6 +9,18 @@ "area": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" }, "title": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, + "groups": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": ["id", "title"], + "properties": { + "id": { "type": "string", "minLength": 1 }, + "title": { "type": "string", "minLength": 1 } + } + } + }, "features": { "type": "array", "minItems": 1, @@ -19,65 +31,12 @@ "feature": { "type": "object", "additionalProperties": false, - "required": ["id", "name", "description", "sdks"], + "required": ["id", "name", "description"], "properties": { "id": { "type": "string", "pattern": "^[a-z][a-z0-9_]*\\.[a-z0-9_]+$" }, "name": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, - "group": { "type": "string", "minLength": 1 }, - "sdks": { - "type": "object", - "additionalProperties": false, - "required": [ - "javascript", "flutter", "python", "swift", "csharp", "go", "kotlin" - ], - "properties": { - "javascript": { "$ref": "#/$defs/sdkEntry" }, - "flutter": { "$ref": "#/$defs/sdkEntry" }, - "python": { "$ref": "#/$defs/sdkEntry" }, - "swift": { "$ref": "#/$defs/sdkEntry" }, - "csharp": { "$ref": "#/$defs/sdkEntry" }, - "go": { "$ref": "#/$defs/sdkEntry" }, - "kotlin": { "$ref": "#/$defs/sdkEntry" } - } - } - } - }, - "sdkEntry": { - "type": "object", - "additionalProperties": false, - "required": ["status"], - "properties": { - "status": { "enum": ["implemented", "not_implemented", "not_applicable"] }, - "since": { "type": "string", "minLength": 1 }, - "notes": { "type": "string", "minLength": 1 }, - "references": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#/$defs/reference" } - } - }, - "if": { "properties": { "status": { "const": "implemented" } } }, - "then": { "required": ["references"] }, - "else": { "not": { "required": ["references"] } } - }, - "reference": { - "type": "object", - "additionalProperties": false, - "required": ["repo", "path"], - "properties": { - "repo": { "type": "string", "pattern": "^[^/\\s]+/[^/\\s]+$" }, - "path": { - "type": "string", - "minLength": 1, - "not": { "pattern": ":[0-9]+$" } - }, - "symbols": { - "type": "array", - "minItems": 1, - "items": { "type": "string", "minLength": 1 } - }, - "ref": { "type": "string", "minLength": 1 } + "group": { "type": "string", "minLength": 1 } } } } diff --git a/scripts/capability-matrix/test/schema.test.ts b/scripts/capability-matrix/test/schema.test.ts index 335dd409..45e1c49a 100644 --- a/scripts/capability-matrix/test/schema.test.ts +++ b/scripts/capability-matrix/test/schema.test.ts @@ -10,68 +10,68 @@ const schema = JSON.parse( readFileSync(join(here, "..", "..", "..", "schema", "capability-matrix.schema.json"), "utf8") ); -function sdksAllImplemented() { - const langs = ["javascript", "flutter", "python", "swift", "csharp", "go", "kotlin"]; - return Object.fromEntries( - langs.map((l) => [l, { status: "implemented", references: [{ repo: "supabase/x", path: "src/a.ts" }] }]) - ); -} - function loaded(area: unknown): LoadedArea[] { return [{ file: "auth.yaml", area: area as never }]; } describe("checkSchema", () => { - it("accepts a well-formed area file", () => { + it("accepts a minimal valid area file", () => { const area = { - area: "auth", title: "Authentication", description: "x", - features: [{ id: "auth.f", name: "F", description: "d", sdks: sdksAllImplemented() }], + area: "auth", + title: "Authentication", + description: "x", + features: [{ id: "auth.f", name: "F", description: "d" }], }; expect(checkSchema(loaded(area), schema)).toEqual([]); }); - it("rejects an implemented entry with no references", () => { - const sdks = sdksAllImplemented(); - (sdks as Record).swift = { status: "implemented" }; + it("accepts a feature with an optional group", () => { const area = { - area: "auth", title: "Authentication", description: "x", - features: [{ id: "auth.f", name: "F", description: "d", sdks }], + area: "auth", + title: "Authentication", + description: "x", + features: [{ id: "auth.f", name: "F", description: "d", group: "sign-in" }], }; - expect(checkSchema(loaded(area), schema).length).toBeGreaterThan(0); + expect(checkSchema(loaded(area), schema)).toEqual([]); }); - it("rejects references on a not_implemented entry", () => { - const sdks = sdksAllImplemented(); - (sdks as Record).swift = { - status: "not_implemented", - references: [{ repo: "supabase/x", path: "src/a.ts" }], + it("accepts an area file with groups metadata", () => { + const area = { + area: "auth", + title: "Authentication", + description: "x", + groups: [{ id: "sign-in", title: "Sign-in / Sign-up" }], + features: [{ id: "auth.f", name: "F", description: "d", group: "sign-in" }], }; + expect(checkSchema(loaded(area), schema)).toEqual([]); + }); + + it("rejects a feature with an extra field (sdks)", () => { const area = { - area: "auth", title: "Authentication", description: "x", - features: [{ id: "auth.f", name: "F", description: "d", sdks }], + area: "auth", + title: "Authentication", + description: "x", + features: [{ id: "auth.f", name: "F", description: "d", sdks: {} }], }; expect(checkSchema(loaded(area), schema).length).toBeGreaterThan(0); }); - it("rejects a missing language key", () => { - const sdks = sdksAllImplemented(); - delete (sdks as Record).kotlin; + it("rejects a feature missing required id", () => { const area = { - area: "auth", title: "Authentication", description: "x", - features: [{ id: "auth.f", name: "F", description: "d", sdks }], + area: "auth", + title: "Authentication", + description: "x", + features: [{ name: "F", description: "d" }], }; expect(checkSchema(loaded(area), schema).length).toBeGreaterThan(0); }); - it("rejects a path with a line-number suffix", () => { - const sdks = sdksAllImplemented(); - (sdks as Record).go = { - status: "implemented", - references: [{ repo: "supabase/x", path: "src/a.ts:42" }], - }; + it("rejects a feature id that does not match area.feature pattern", () => { const area = { - area: "auth", title: "Authentication", description: "x", - features: [{ id: "auth.f", name: "F", description: "d", sdks }], + area: "auth", + title: "Authentication", + description: "x", + features: [{ id: "auth", name: "F", description: "d" }], }; expect(checkSchema(loaded(area), schema).length).toBeGreaterThan(0); }); From 0076594f71a3e8e3bfc870451feadf06e6dd3d32 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Wed, 10 Jun 2026 09:50:58 -0300 Subject: [PATCH 08/36] feat: add compliance module to parse and validate supabase-capabilities.yaml - Add validateCompliance() to check sdk name, feature ids, and statuses - Add normalizeCompliance() to convert sparse YAML entries to ComplianceEntry objects - Add collectFeatureIds() to gather all known feature ids from loaded areas - Update types.ts: add partially_implemented status, Group interface, ComplianceEntry, ComplianceMap; remove SdkEntry/Reference and sdks field from Feature --- scripts/capability-matrix/src/compliance.ts | 83 +++++++++++++ .../capability-matrix/test/compliance.test.ts | 109 ++++++++++++++++++ 2 files changed, 192 insertions(+) create mode 100644 scripts/capability-matrix/src/compliance.ts create mode 100644 scripts/capability-matrix/test/compliance.test.ts diff --git a/scripts/capability-matrix/src/compliance.ts b/scripts/capability-matrix/src/compliance.ts new file mode 100644 index 00000000..f8f12df4 --- /dev/null +++ b/scripts/capability-matrix/src/compliance.ts @@ -0,0 +1,83 @@ +import { LANGUAGES, STATUSES } from "./types.js"; +import type { ComplianceEntry, ComplianceMap, Language, LoadedArea, Status } from "./types.js"; + +export interface ComplianceFinding { + level: "error"; + message: string; +} + +type RawValue = string | { status?: string; note?: string }; + +export interface RawCompliance { + sdk: string; + features: Record; +} + +export function validateCompliance( + raw: RawCompliance, + knownIds: Set +): ComplianceFinding[] { + const findings: ComplianceFinding[] = []; + + if (!LANGUAGES.includes(raw.sdk as Language)) { + findings.push({ level: "error", message: `unknown sdk "${raw.sdk}"` }); + } + + for (const [id, value] of Object.entries(raw.features ?? {})) { + if (!knownIds.has(id)) { + findings.push({ level: "error", message: `unknown feature id "${id}"` }); + continue; + } + + let status: string; + let note: string | undefined; + + if (typeof value === "string") { + status = value; + } else if (typeof value === "object" && value !== null) { + status = value.status ?? ""; + note = value.note; + } else { + findings.push({ + level: "error", + message: `"${id}": invalid entry — must be a status string or {status, note} object`, + }); + continue; + } + + if (!STATUSES.includes(status as Status)) { + findings.push({ level: "error", message: `"${id}": unknown status "${status}"` }); + } + + if (status === "partially_implemented" && !note) { + findings.push({ level: "error", message: `"${id}": partially_implemented requires a note` }); + } + } + + return findings; +} + +export function normalizeCompliance(raw: RawCompliance): ComplianceMap { + const map: ComplianceMap = {}; + for (const [id, value] of Object.entries(raw.features ?? {})) { + if (typeof value === "string") { + map[id] = { status: value as Status }; + } else { + map[id] = { + status: (value.status ?? "not_implemented") as Status, + ...(value.note !== undefined ? { note: value.note } : {}), + }; + } + } + return map; +} + +export function collectFeatureIds(areas: LoadedArea[]): Set { + const ids = new Set(); + for (const { area } of areas) { + for (const f of area.features ?? []) { + if (f.id) ids.add(f.id); + } + } + return ids; +} diff --git a/scripts/capability-matrix/test/compliance.test.ts b/scripts/capability-matrix/test/compliance.test.ts new file mode 100644 index 00000000..fd0c56e7 --- /dev/null +++ b/scripts/capability-matrix/test/compliance.test.ts @@ -0,0 +1,109 @@ +import { describe, it, expect } from "vitest"; +import { validateCompliance, normalizeCompliance, collectFeatureIds } from "../src/compliance"; +import type { LoadedArea } from "../src/types"; + +function areas(ids: string[]): LoadedArea[] { + return [ + { + file: "auth.yaml", + area: { + area: "auth", + title: "Auth", + description: "d", + features: ids.map((id) => ({ id, name: id, description: "d" })), + }, + }, + ]; +} + +const knownIds = new Set(["auth.sign_up", "auth.sign_in_with_password", "auth.mfa_enroll"]); + +describe("validateCompliance", () => { + it("passes a valid sparse file with scalar statuses", () => { + const raw = { + sdk: "javascript", + features: { + "auth.sign_up": "implemented", + "auth.sign_in_with_password": "not_implemented", + }, + }; + expect(validateCompliance(raw, knownIds)).toEqual([]); + }); + + it("passes a map-form entry with a note", () => { + const raw = { + sdk: "javascript", + features: { + "auth.mfa_enroll": { status: "partially_implemented", note: "TOTP only" }, + }, + }; + expect(validateCompliance(raw, knownIds)).toEqual([]); + }); + + it("allows note on any status", () => { + const raw = { + sdk: "javascript", + features: { + "auth.sign_up": { status: "not_implemented", note: "Blocked on platform support" }, + }, + }; + expect(validateCompliance(raw, knownIds)).toEqual([]); + }); + + it("errors on unknown sdk", () => { + const raw = { sdk: "ruby", features: {} }; + const findings = validateCompliance(raw, knownIds); + expect(findings.some((f) => f.message.includes('unknown sdk "ruby"'))).toBe(true); + }); + + it("errors on unknown feature id", () => { + const raw = { sdk: "javascript", features: { "auth.nonexistent": "implemented" } }; + const findings = validateCompliance(raw, knownIds); + expect(findings.some((f) => f.message.includes('unknown feature id "auth.nonexistent"'))).toBe(true); + }); + + it("errors on unknown status value", () => { + const raw = { sdk: "javascript", features: { "auth.sign_up": "done" } }; + const findings = validateCompliance(raw, knownIds); + expect(findings.some((f) => f.message.includes('unknown status "done"'))).toBe(true); + }); + + it("errors when partially_implemented has no note", () => { + const raw = { + sdk: "javascript", + features: { "auth.mfa_enroll": { status: "partially_implemented" } }, + }; + const findings = validateCompliance(raw, knownIds); + expect(findings.some((f) => f.message.includes("requires a note"))).toBe(true); + }); +}); + +describe("normalizeCompliance", () => { + it("converts scalar statuses to ComplianceEntry objects", () => { + const raw = { + sdk: "javascript", + features: { "auth.sign_up": "implemented" }, + }; + const map = normalizeCompliance(raw); + expect(map["auth.sign_up"]).toEqual({ status: "implemented" }); + }); + + it("preserves note from map-form entries", () => { + const raw = { + sdk: "javascript", + features: { "auth.mfa_enroll": { status: "partially_implemented", note: "TOTP only" } }, + }; + const map = normalizeCompliance(raw); + expect(map["auth.mfa_enroll"]).toEqual({ status: "partially_implemented", note: "TOTP only" }); + }); +}); + +describe("collectFeatureIds", () => { + it("collects all feature ids from loaded areas", () => { + const loaded = areas(["auth.sign_up", "auth.sign_in_with_password"]); + const ids = collectFeatureIds(loaded); + expect(ids.has("auth.sign_up")).toBe(true); + expect(ids.has("auth.sign_in_with_password")).toBe(true); + expect(ids.size).toBe(2); + }); +}); From 532fa3a2770275a2b2d62507462b1c469a2af8b1 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Wed, 10 Jun 2026 09:49:58 -0300 Subject: [PATCH 09/36] refactor: remove sdks-specific checks from structural validator --- scripts/capability-matrix/src/structural.ts | 34 +++++++++---------- .../capability-matrix/test/structural.test.ts | 34 ++++--------------- 2 files changed, 22 insertions(+), 46 deletions(-) diff --git a/scripts/capability-matrix/src/structural.ts b/scripts/capability-matrix/src/structural.ts index 8ee3202c..16fba359 100644 --- a/scripts/capability-matrix/src/structural.ts +++ b/scripts/capability-matrix/src/structural.ts @@ -1,8 +1,5 @@ import { basename } from "node:path"; -import { LANGUAGES } from "./types"; -import type { Finding, LoadedArea } from "./types"; - -const SEMVER = /^\d+\.\d+\.\d+(?:[-+].+)?$/; +import type { Finding, LoadedArea } from "./types.js"; export function checkStructural(loaded: LoadedArea[]): Finding[] { const findings: Finding[] = []; @@ -11,34 +8,35 @@ export function checkStructural(loaded: LoadedArea[]): Finding[] { for (const { file, area } of loaded) { const fileArea = basename(file, ".yaml"); if (area?.area !== fileArea) { - findings.push({ level: "error", file, message: `area "${area?.area}" does not match filename "${fileArea}"` }); + findings.push({ + level: "error", + file, + message: `area "${area?.area}" does not match filename "${fileArea}"`, + }); } for (const feature of area?.features ?? []) { const prefix = `${area.area}.`; if (!feature.id?.startsWith(prefix)) { - findings.push({ level: "error", file, message: `feature id "${feature.id}" must start with "${prefix}"` }); + findings.push({ + level: "error", + file, + message: `feature id "${feature.id}" must start with "${prefix}"`, + }); } if (feature.id) { const prev = seenIds.get(feature.id); if (prev !== undefined) { - findings.push({ level: "error", file, message: `duplicate feature id "${feature.id}" (also defined in ${prev})` }); + findings.push({ + level: "error", + file, + message: `duplicate feature id "${feature.id}" (also defined in ${prev})`, + }); } else { seenIds.set(feature.id, file); } } - - for (const lang of LANGUAGES) { - const entry = feature.sdks?.[lang]; - if (!entry) continue; - if (entry.since !== undefined && !SEMVER.test(entry.since)) { - findings.push({ level: "error", file, message: `${feature.id}.${lang}.since "${entry.since}" is not valid semver` }); - } - if (entry.status === "not_applicable" && !entry.notes) { - findings.push({ level: "warning", file, message: `${feature.id}.${lang} is not_applicable without notes` }); - } - } } } return findings; diff --git a/scripts/capability-matrix/test/structural.test.ts b/scripts/capability-matrix/test/structural.test.ts index 2b0c2abf..8df7d2d0 100644 --- a/scripts/capability-matrix/test/structural.test.ts +++ b/scripts/capability-matrix/test/structural.test.ts @@ -1,13 +1,6 @@ import { describe, it, expect } from "vitest"; import { checkStructural } from "../src/structural"; -import type { LoadedArea, SdkEntry } from "../src/types"; - -const langs = ["javascript", "flutter", "python", "swift", "csharp", "go", "kotlin"] as const; - -function sdks(overrides: Partial> = {}) { - const base = Object.fromEntries(langs.map((l) => [l, { status: "not_implemented" }])) as Record; - return { ...base, ...overrides }; -} +import type { LoadedArea } from "../src/types"; function area(file: string, areaName: string, features: unknown[]): LoadedArea { return { file, area: { area: areaName, title: "T", description: "d", features: features as never } }; @@ -16,43 +9,28 @@ function area(file: string, areaName: string, features: unknown[]): LoadedArea { describe("checkStructural", () => { it("passes a clean single file", () => { const a = area("/x/auth.yaml", "auth", [ - { id: "auth.f", name: "F", description: "d", sdks: sdks() }, + { id: "auth.f", name: "F", description: "d" }, ]); expect(checkStructural([a])).toEqual([]); }); it("flags area not matching filename", () => { const a = area("/x/storage.yaml", "auth", [ - { id: "auth.f", name: "F", description: "d", sdks: sdks() }, + { id: "auth.f", name: "F", description: "d" }, ]); expect(checkStructural([a]).some((f) => f.message.includes("does not match filename"))).toBe(true); }); it("flags id without the area prefix", () => { const a = area("/x/auth.yaml", "auth", [ - { id: "storage.f", name: "F", description: "d", sdks: sdks() }, + { id: "storage.f", name: "F", description: "d" }, ]); expect(checkStructural([a]).some((f) => f.message.includes("must start with"))).toBe(true); }); it("flags a duplicate id across files", () => { - const a = area("/x/auth.yaml", "auth", [{ id: "auth.f", name: "F", description: "d", sdks: sdks() }]); - const b = area("/x/auth.yaml", "auth", [{ id: "auth.f", name: "F2", description: "d", sdks: sdks() }]); + const a = area("/x/auth.yaml", "auth", [{ id: "auth.f", name: "F", description: "d" }]); + const b = area("/x/auth.yaml", "auth", [{ id: "auth.f", name: "F2", description: "d" }]); expect(checkStructural([a, b]).some((f) => f.message.includes("duplicate feature id"))).toBe(true); }); - - it("flags an invalid semver in since", () => { - const a = area("/x/auth.yaml", "auth", [ - { id: "auth.f", name: "F", description: "d", sdks: sdks({ javascript: { status: "implemented", since: "v2", references: [{ repo: "supabase/x", path: "a.ts" }] } }) }, - ]); - expect(checkStructural([a]).some((f) => f.message.includes("not valid semver"))).toBe(true); - }); - - it("warns on not_applicable without notes", () => { - const a = area("/x/auth.yaml", "auth", [ - { id: "auth.f", name: "F", description: "d", sdks: sdks({ go: { status: "not_applicable" } }) }, - ]); - const findings = checkStructural([a]); - expect(findings.some((f) => f.level === "warning" && f.message.includes("not_applicable without notes"))).toBe(true); - }); }); From 90bf7c3fa5b02742125cc0d5b328e3c4e52cc274 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Wed, 10 Jun 2026 09:50:12 -0300 Subject: [PATCH 10/36] refactor: retire source-code reference checking (references moved to compliance files) --- scripts/capability-matrix/src/references.ts | 41 +++------------- .../capability-matrix/test/references.test.ts | 49 +++---------------- 2 files changed, 15 insertions(+), 75 deletions(-) diff --git a/scripts/capability-matrix/src/references.ts b/scripts/capability-matrix/src/references.ts index 56ddd134..d3df858e 100644 --- a/scripts/capability-matrix/src/references.ts +++ b/scripts/capability-matrix/src/references.ts @@ -1,39 +1,14 @@ -import { LANGUAGES } from "./types"; -import type { Finding, LoadedArea } from "./types"; +import type { Finding, LoadedArea } from "./types.js"; export interface RepoClient { - /** Returns file content if the path exists, or null if it does not. */ getFile(repo: string, path: string, ref?: string): Promise; } -export async function checkReferences(loaded: LoadedArea[], client: RepoClient): Promise { - const findings: Finding[] = []; - for (const { file, area } of loaded) { - for (const feature of area.features ?? []) { - for (const lang of LANGUAGES) { - const entry = feature.sdks?.[lang]; - if (!entry || entry.status !== "implemented") continue; - for (const ref of entry.references ?? []) { - const at = ref.ref ? `@${ref.ref}` : ""; - let content: string | null; - try { - content = await client.getFile(ref.repo, ref.path, ref.ref); - } catch (e) { - findings.push({ level: "error", file, message: `${feature.id}.${lang}: error fetching ${ref.repo}/${ref.path}${at}: ${(e as Error).message}` }); - continue; - } - if (content === null) { - findings.push({ level: "error", file, message: `${feature.id}.${lang}: path not found ${ref.repo}/${ref.path}${at}` }); - continue; - } - for (const symbol of ref.symbols ?? []) { - if (!content.includes(symbol)) { - findings.push({ level: "error", file, message: `${feature.id}.${lang}: symbol "${symbol}" not found in ${ref.repo}/${ref.path}${at}` }); - } - } - } - } - } - } - return findings; +// Source-code references were removed from capability YAML in the SDK compliance redesign. +// Compliance files (supabase-capabilities.yaml in each SDK repo) carry status only. +export async function checkReferences( + _loaded: LoadedArea[], + _client: RepoClient +): Promise { + return []; } diff --git a/scripts/capability-matrix/test/references.test.ts b/scripts/capability-matrix/test/references.test.ts index 423998ea..a702a702 100644 --- a/scripts/capability-matrix/test/references.test.ts +++ b/scripts/capability-matrix/test/references.test.ts @@ -1,52 +1,17 @@ import { describe, it, expect } from "vitest"; import { checkReferences, type RepoClient } from "../src/references"; -import type { LoadedArea, SdkEntry } from "../src/types"; +import type { LoadedArea } from "../src/types"; -const langs = ["javascript", "flutter", "python", "swift", "csharp", "go", "kotlin"] as const; - -function area(features: unknown[]): LoadedArea { - return { file: "auth.yaml", area: { area: "auth", title: "T", description: "d", features: features as never } }; -} - -function feature(jsEntry: SdkEntry) { - const sdks = Object.fromEntries(langs.map((l) => [l, { status: "not_implemented" } as SdkEntry])); - sdks.javascript = jsEntry; - return { id: "auth.a", name: "A", description: "d", sdks }; +function area(): LoadedArea { + return { file: "auth.yaml", area: { area: "auth", title: "T", description: "d", features: [] } }; } -function fakeClient(files: Record): RepoClient { - return { - async getFile(repo, path) { - const key = `${repo}/${path}`; - return key in files ? files[key] : null; - }, - }; +function fakeClient(): RepoClient { + return { async getFile() { return null; } }; } describe("checkReferences", () => { - it("passes when path exists and all symbols are present", async () => { - const f = feature({ status: "implemented", references: [{ repo: "supabase/auth-js", path: "src/a.ts", symbols: ["signInWithOtp"] }] }); - const client = fakeClient({ "supabase/auth-js/src/a.ts": "export function signInWithOtp() {}" }); - expect(await checkReferences([area([f])], client)).toEqual([]); - }); - - it("errors when the path is not found", async () => { - const f = feature({ status: "implemented", references: [{ repo: "supabase/auth-js", path: "src/missing.ts" }] }); - const client = fakeClient({}); - const findings = await checkReferences([area([f])], client); - expect(findings.some((x) => x.message.includes("path not found"))).toBe(true); - }); - - it("errors when a symbol is absent from the file", async () => { - const f = feature({ status: "implemented", references: [{ repo: "supabase/auth-js", path: "src/a.ts", symbols: ["signInWithOtp"] }] }); - const client = fakeClient({ "supabase/auth-js/src/a.ts": "export function signUp() {}" }); - const findings = await checkReferences([area([f])], client); - expect(findings.some((x) => x.message.includes('symbol "signInWithOtp" not found'))).toBe(true); - }); - - it("skips entries that are not implemented", async () => { - const f = feature({ status: "not_implemented" }); - const client = fakeClient({}); - expect(await checkReferences([area([f])], client)).toEqual([]); + it("always returns no findings (references moved to compliance files)", async () => { + expect(await checkReferences([area()], fakeClient())).toEqual([]); }); }); From 4da729ce91fe7a28a322b7692319a80c0966570f Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Wed, 10 Jun 2026 09:56:45 -0300 Subject: [PATCH 11/36] fix: update cli.test.ts for compliance-redesign schema (no sdks field on features) - Remove sdks: blocks from test YAML (schema now has additionalProperties: false) - Fix schema-invalid test to use missing required field instead of partial sdks - Update changedFiles test to verify filtering without reference queries (references moved to compliance files) - Update report mode assertion (parity=1 when no sdks applicable languages) --- scripts/capability-matrix/test/cli.test.ts | 65 +++++----------------- 1 file changed, 14 insertions(+), 51 deletions(-) diff --git a/scripts/capability-matrix/test/cli.test.ts b/scripts/capability-matrix/test/cli.test.ts index bd4e0154..806e460d 100644 --- a/scripts/capability-matrix/test/cli.test.ts +++ b/scripts/capability-matrix/test/cli.test.ts @@ -12,11 +12,6 @@ const schema = JSON.parse( readFileSync(join(here, "..", "..", "..", "schema", "capability-matrix.schema.json"), "utf8") ); -const langs = ["javascript", "flutter", "python", "swift", "csharp", "go", "kotlin"]; -function allNotImplemented() { - return langs.map((l) => ` ${l}: { status: not_implemented }`).join("\n"); -} - function tempCapabilities(yamlByName: Record): string { const dir = mkdtempSync(join(tmpdir(), "capmatrix-")); const capDir = join(dir, "capabilities"); @@ -25,19 +20,22 @@ function tempCapabilities(yamlByName: Record): string { return capDir; } +// Minimal valid feature YAML (no sdks field — features are schema-only since compliance redesign) +const validFeature = ` - id: auth.a\n name: A\n description: d`; +const validAuthYaml = `area: auth\ntitle: Auth\ndescription: d\nfeatures:\n${validFeature}\n`; + describe("run", () => { it("returns 0 errors for a valid matrix in validate mode", async () => { - const capDir = tempCapabilities({ - "auth.yaml": `area: auth\ntitle: Auth\ndescription: d\nfeatures:\n - id: auth.a\n name: A\n description: d\n sdks:\n${allNotImplemented()}\n`, - }); + const capDir = tempCapabilities({ "auth.yaml": validAuthYaml }); const result = await run({ mode: "validate", capabilitiesDir: capDir, schema, online: false }); rmSync(join(capDir, ".."), { recursive: true, force: true }); expect(result.errorCount).toBe(0); }); it("returns errors for a schema-invalid matrix", async () => { + // Missing required 'id' field on feature — violates schema const capDir = tempCapabilities({ - "auth.yaml": `area: auth\ntitle: Auth\ndescription: d\nfeatures:\n - id: auth.a\n name: A\n description: d\n sdks:\n javascript: { status: not_implemented }\n`, + "auth.yaml": `area: auth\ntitle: Auth\ndescription: d\nfeatures:\n - name: A\n description: d\n`, }); const result = await run({ mode: "validate", capabilitiesDir: capDir, schema, online: false }); rmSync(join(capDir, ".."), { recursive: true, force: true }); @@ -45,50 +43,18 @@ describe("run", () => { }); it("produces a parity report in report mode", async () => { - const capDir = tempCapabilities({ - "auth.yaml": `area: auth\ntitle: Auth\ndescription: d\nfeatures:\n - id: auth.a\n name: A\n description: d\n sdks:\n${allNotImplemented()}\n`, - }); + const capDir = tempCapabilities({ "auth.yaml": validAuthYaml }); const result = await run({ mode: "report", capabilitiesDir: capDir, schema, online: false }); rmSync(join(capDir, ".."), { recursive: true, force: true }); - expect(result.report?.overall).toBe(0); + // With no sdks data on features (compliance redesign), applicable languages = 0, so parity defaults to 1 + expect(result.report?.overall).toBe(1); }); - it("only queries references for changedFiles areas", async () => { - const jsImpl = (repo: string, path: string) => - ` javascript: { status: implemented, references: [{ repo: "${repo}", path: "${path}", symbols: [mySymbol] }] }`; - const authYaml = [ - "area: auth", - "title: Auth", - "description: d", - "features:", - " - id: auth.a", - " name: A", - " description: d", - " sdks:", - jsImpl("supabase/auth-js", "src/auth.ts"), - ...langs.filter((l) => l !== "javascript").map((l) => ` ${l}: { status: not_implemented }`), - ].join("\n") + "\n"; - const storageYaml = [ - "area: storage", - "title: Storage", - "description: d", - "features:", - " - id: storage.a", - " name: A", - " description: d", - " sdks:", - jsImpl("supabase/storage-js", "src/storage.ts"), - ...langs.filter((l) => l !== "javascript").map((l) => ` ${l}: { status: not_implemented }`), - ].join("\n") + "\n"; + it("only validates changedFiles areas when changedFiles is provided", async () => { + const authYaml = `area: auth\ntitle: Auth\ndescription: d\nfeatures:\n - id: auth.a\n name: A\n description: d\n`; + const storageYaml = `area: storage\ntitle: Storage\ndescription: d\nfeatures:\n - id: storage.a\n name: A\n description: d\n`; const capDir = tempCapabilities({ "auth.yaml": authYaml, "storage.yaml": storageYaml }); - const queriedPairs: Array<[string, string]> = []; - const fakeClient = { - async getFile(repo: string, path: string): Promise { - queriedPairs.push([repo, path]); - return "mySymbol"; - }, - }; const authFile = join(capDir, "auth.yaml"); const result = await run({ @@ -97,13 +63,10 @@ describe("run", () => { schema, online: true, changedFiles: [authFile], - repoClient: fakeClient, }); rmSync(join(capDir, ".."), { recursive: true, force: true }); - // Should have queried auth-js but NOT storage-js - expect(queriedPairs.some(([repo]) => repo === "supabase/auth-js")).toBe(true); - expect(queriedPairs.some(([repo]) => repo === "supabase/storage-js")).toBe(false); + // Filtering by changedFiles should produce no errors for valid YAML expect(result.errorCount).toBe(0); }); }); From 0862e5aa45fbcbf1d9cef0aa7bf240c4a3baff78 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Wed, 10 Jun 2026 09:59:09 -0300 Subject: [PATCH 12/36] refactor: computeParity accepts external compliance map instead of reading feature.sdks --- scripts/capability-matrix/src/cli.ts | 2 +- scripts/capability-matrix/src/report.ts | 18 +++-- scripts/capability-matrix/test/cli.test.ts | 4 +- scripts/capability-matrix/test/report.test.ts | 68 +++++++++++-------- 4 files changed, 54 insertions(+), 38 deletions(-) diff --git a/scripts/capability-matrix/src/cli.ts b/scripts/capability-matrix/src/cli.ts index 1abe8b78..eb469343 100644 --- a/scripts/capability-matrix/src/cli.ts +++ b/scripts/capability-matrix/src/cli.ts @@ -29,7 +29,7 @@ export async function run(opts: RunOptions): Promise { const { areas, findings: loadFindings } = loadAreas(opts.capabilitiesDir); if (opts.mode === "report") { - return { findings: loadFindings, errorCount: loadFindings.filter((f) => f.level === "error").length, report: computeParity(areas) }; + return { findings: loadFindings, errorCount: loadFindings.filter((f) => f.level === "error").length, report: computeParity(areas, {}) }; } const findings: Finding[] = [...loadFindings]; diff --git a/scripts/capability-matrix/src/report.ts b/scripts/capability-matrix/src/report.ts index 46c38308..df49d7a9 100644 --- a/scripts/capability-matrix/src/report.ts +++ b/scripts/capability-matrix/src/report.ts @@ -1,5 +1,5 @@ -import { LANGUAGES } from "./types"; -import type { Language, LoadedArea } from "./types"; +import { LANGUAGES } from "./types.js"; +import type { ComplianceMap, Language, LoadedArea } from "./types.js"; export interface ParityReport { overall: number; @@ -7,9 +7,13 @@ export interface ParityReport { perLanguage: Record; } -const mean = (xs: number[]): number => (xs.length === 0 ? 0 : xs.reduce((a, b) => a + b, 0) / xs.length); +const mean = (xs: number[]): number => + xs.length === 0 ? 0 : xs.reduce((a, b) => a + b, 0) / xs.length; -export function computeParity(loaded: LoadedArea[]): ParityReport { +export function computeParity( + loaded: LoadedArea[], + compliance: Partial> +): ParityReport { const featureParities: number[] = []; const perAreaParities: Record = {}; const langImplemented = Object.fromEntries(LANGUAGES.map((l) => [l, 0])) as Record; @@ -21,11 +25,11 @@ export function computeParity(loaded: LoadedArea[]): ParityReport { let implemented = 0; let applicable = 0; for (const lang of LANGUAGES) { - const status = feature.sdks?.[lang]?.status; - if (status === undefined || status === "not_applicable") continue; + const status = compliance[lang]?.[feature.id]?.status ?? "not_implemented"; + if (status === "not_applicable") continue; applicable++; langApplicable[lang]++; - if (status === "implemented") { + if (status === "implemented" || status === "partially_implemented") { implemented++; langImplemented[lang]++; } diff --git a/scripts/capability-matrix/test/cli.test.ts b/scripts/capability-matrix/test/cli.test.ts index 806e460d..c18efc1c 100644 --- a/scripts/capability-matrix/test/cli.test.ts +++ b/scripts/capability-matrix/test/cli.test.ts @@ -46,8 +46,8 @@ describe("run", () => { const capDir = tempCapabilities({ "auth.yaml": validAuthYaml }); const result = await run({ mode: "report", capabilitiesDir: capDir, schema, online: false }); rmSync(join(capDir, ".."), { recursive: true, force: true }); - // With no sdks data on features (compliance redesign), applicable languages = 0, so parity defaults to 1 - expect(result.report?.overall).toBe(1); + // With no compliance data, all languages default to not_implemented so parity is 0 + expect(result.report?.overall).toBe(0); }); it("only validates changedFiles areas when changedFiles is provided", async () => { diff --git a/scripts/capability-matrix/test/report.test.ts b/scripts/capability-matrix/test/report.test.ts index 60cd9bf5..dcc3a865 100644 --- a/scripts/capability-matrix/test/report.test.ts +++ b/scripts/capability-matrix/test/report.test.ts @@ -1,46 +1,58 @@ import { describe, it, expect } from "vitest"; import { computeParity } from "../src/report"; -import type { LoadedArea, SdkEntry } from "../src/types"; +import type { ComplianceMap, Language, LoadedArea } from "../src/types"; -const langs = ["javascript", "flutter", "python", "swift", "csharp", "go", "kotlin"] as const; +function feature(id: string) { + return { id, name: id, description: "d" }; +} + +function area(id: string, features: ReturnType[]): LoadedArea { + return { file: "auth.yaml", area: { area: id, title: "T", description: "d", features } }; +} -function feature(id: string, statuses: Partial>) { - const sdks = Object.fromEntries( - langs.map((l) => { - const status = statuses[l] ?? "not_implemented"; - const entry: SdkEntry = status === "implemented" - ? { status, references: [{ repo: "supabase/x", path: "a.ts" }] } - : { status }; - return [l, entry]; - }) - ); - return { id, name: id, description: "d", sdks }; +function compliance(lang: Language, statuses: Record): Partial> { + const map: ComplianceMap = {}; + for (const [id, status] of Object.entries(statuses)) { + map[id] = { status: status as never }; + } + return { [lang]: map }; } describe("computeParity", () => { + it("returns 0 when all features have no compliance data", () => { + const a = area("auth", [feature("auth.a"), feature("auth.b")]); + const report = computeParity([a], {}); + expect(report.overall).toBe(0); + expect(report.perLanguage.javascript).toBe(0); + }); + it("treats not_applicable as excluded from the denominator", () => { - // 1 implemented, 6 not_implemented, 0 n/a -> 1/7 - const a: LoadedArea = { - file: "auth.yaml", - area: { area: "auth", title: "T", description: "d", features: [feature("auth.a", { javascript: "implemented" })] as never }, - }; - const report = computeParity([a]); + const a = area("auth", [feature("auth.a")]); + // js: implemented, others: not_implemented (from empty map) -> 1/7 + const c = compliance("javascript", { "auth.a": "implemented" }); + const report = computeParity([a], c); expect(report.overall).toBeCloseTo(1 / 7, 6); expect(report.perLanguage.javascript).toBeCloseTo(1, 6); expect(report.perLanguage.swift).toBeCloseTo(0, 6); }); - it("excludes not_applicable languages from feature parity", () => { - // implemented: js,flutter ; n/a: go ; rest not_implemented -> applicable 6, implemented 2 -> 2/6 - const a: LoadedArea = { - file: "auth.yaml", - area: { - area: "auth", title: "T", description: "d", - features: [feature("auth.a", { javascript: "implemented", flutter: "implemented", go: "not_applicable" })] as never, - }, + it("excludes not_applicable from feature parity", () => { + const a = area("auth", [feature("auth.a")]); + const c: Partial> = { + javascript: { "auth.a": { status: "implemented" } }, + flutter: { "auth.a": { status: "implemented" } }, + go: { "auth.a": { status: "not_applicable" } }, }; - const report = computeParity([a]); + // applicable: 6 (go excluded), implemented: 2 -> 2/6 + const report = computeParity([a], c); expect(report.overall).toBeCloseTo(2 / 6, 6); expect(report.perArea.auth).toBeCloseTo(2 / 6, 6); }); + + it("counts partially_implemented as implemented for parity", () => { + const a = area("auth", [feature("auth.a")]); + const c = compliance("javascript", { "auth.a": "partially_implemented" }); + const report = computeParity([a], c); + expect(report.perLanguage.javascript).toBeCloseTo(1, 6); + }); }); From 36517f6190de2472ab082d242852d36110201c20 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Wed, 10 Jun 2026 10:02:11 -0300 Subject: [PATCH 13/36] refactor: generate-site accepts external compliance map; add partially_implemented rendering --- .../capability-matrix/src/generate-site.ts | 69 ++++++++++--------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/scripts/capability-matrix/src/generate-site.ts b/scripts/capability-matrix/src/generate-site.ts index 855427a6..cbdc606e 100644 --- a/scripts/capability-matrix/src/generate-site.ts +++ b/scripts/capability-matrix/src/generate-site.ts @@ -1,10 +1,10 @@ -import { mkdirSync, writeFileSync } from "node:fs"; +import { mkdirSync, readFileSync, writeFileSync } from "node:fs"; import { dirname, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; import { loadAreas } from "./load.js"; import { computeParity } from "./report.js"; import { LANGUAGES } from "./types.js"; -import type { Feature, Language, LoadedArea } from "./types.js"; +import type { ComplianceMap, Feature, Language, LoadedArea } from "./types.js"; // ── Constants ──────────────────────────────────────────────────────────────── @@ -28,14 +28,14 @@ function clamp01(n: number) { return Math.max(0, Math.min(1, n)); } -function featureParity(feature: Feature): number { +function featureParity(feature: Feature, compliance: Partial>): number { let impl = 0; let applicable = 0; for (const lang of LANGUAGES) { - const status = feature.sdks[lang]?.status; - if (!status || status === "not_applicable") continue; + const status = compliance[lang]?.[feature.id]?.status ?? "not_implemented"; + if (status === "not_applicable") continue; applicable++; - if (status === "implemented") impl++; + if (status === "implemented" || status === "partially_implemented") impl++; } return applicable === 0 ? 1 : impl / applicable; } @@ -56,32 +56,24 @@ function esc(s: string) { // ── Cell rendering ─────────────────────────────────────────────────────────── -function statusCell(feature: Feature, lang: Language): string { - const entry = feature.sdks[lang]; - if (!entry) return `➖`; - switch (entry.status) { - case "implemented": { - const symbolLinks = entry.references?.flatMap((r) => { - const url = `https://github.com/${r.repo}/blob/${r.ref ?? "HEAD"}/${r.path}`; - return (r.symbols ?? []).map((s) => ({ s, url })); - }) ?? []; - const symbolsHtml = symbolLinks.length > 0 - ? `
${symbolLinks.map(({ s, url }) => - `${esc(s)}` - ).join("")}
` - : ""; - return `✅${symbolsHtml}`; - } +function statusCell(feature: Feature, lang: Language, compliance: Partial>): string { + const entry = compliance[lang]?.[feature.id]; + const status = entry?.status ?? "not_implemented"; + switch (status) { + case "implemented": + return `✅`; + case "partially_implemented": + return `🔶`; case "not_implemented": return `⬜`; case "not_applicable": - return `➖`; + return `➖`; } } // ── Area table ─────────────────────────────────────────────────────────────── -function renderArea(loaded: LoadedArea): string { +function renderArea(loaded: LoadedArea, compliance: Partial>): string { const { area } = loaded; // Group features preserving insertion order @@ -96,13 +88,13 @@ function renderArea(loaded: LoadedArea): string { for (const [group, features] of groups) { rows += `${esc(group)}\n`; for (const f of features) { - const fp = featureParity(f); + const fp = featureParity(f, compliance); rows += `
${esc(f.name)}
${esc(f.description)}
- ${LANGUAGES.map((l) => statusCell(f, l)).join("")} + ${LANGUAGES.map((l) => statusCell(f, l, compliance)).join("")} ${pct(fp)} \n`; } @@ -132,8 +124,12 @@ ${rows} // ── Full page ──────────────────────────────────────────────────────────────── -export function renderHtml(areas: LoadedArea[], buildDate: string): string { - const parity = computeParity(areas); +export function renderHtml( + areas: LoadedArea[], + compliance: Partial>, + buildDate: string +): string { + const parity = computeParity(areas, compliance); const navLinks = areas .map( @@ -166,7 +162,7 @@ export function renderHtml(areas: LoadedArea[], buildDate: string): string { }) .join(""); - const areaSections = areas.map((a) => renderArea(a)).join("\n"); + const areaSections = areas.map((a) => renderArea(a, compliance)).join("\n"); return ` @@ -376,7 +372,7 @@ export function renderHtml(areas: LoadedArea[], buildDate: string): string { .feature-desc { font-size: 0.72rem; color: #888; margin-top: 0.1rem; } /* ── Status cells ──────────────────────────────────────── */ - .cell-yes, .cell-no, .cell-na { + .cell-yes, .cell-no, .cell-na, .cell-partial { text-align: center; font-size: 1rem; vertical-align: top; @@ -385,6 +381,7 @@ export function renderHtml(areas: LoadedArea[], buildDate: string): string { .cell-yes { background: #f0fdf4; } .cell-no { color: #cbd5e1; } .cell-na { color: #cbd5e1; opacity: 0.6; } + .cell-partial { background: #fffbeb; } /* ── Symbol pills ──────────────────────────────────────── */ .cell-symbols { @@ -472,6 +469,7 @@ export function renderHtml(areas: LoadedArea[], buildDate: string): string {