@neon/skills 3.0.8 → 3.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neon/skills",
3
- "version": "3.0.8",
3
+ "version": "3.0.10",
4
4
  "description": "Agent Skills for Neon: Lakebase Postgres, Managed Better Auth, Realtime, Object Storage, Functions, the Data API, and AI Gateway",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "neon-postgres",
4
- "version": "3.0.8",
4
+ "version": "3.0.10",
5
5
  "description": "Manage your Neon backend with the Neon agent skills and the Neon MCP Server: Lakebase Postgres, Managed Better Auth, Realtime, Object Storage, Functions, the Data API, and AI Gateway",
6
6
  "author": {
7
7
  "name": "Neon",
@@ -206,10 +206,10 @@ pnpm add -g neon # pnpm
206
206
 
207
207
  For full CLI installation options, see https://neon.com/docs/cli/install.md
208
208
 
209
- Then inspect credentials without printing secrets. `NEON_API_KEY` or a `neon profile list -o json` row whose `account` is not `-` is an account. A `DEFAULT` row with `account: "-"` and `file: "missing"` is not.
209
+ Then inspect credentials without printing secrets. `NEON_API_KEY`, or the active `neon profile list -o json` row (`active: "*"`) with an `account` other than `-`, is an account. A `DEFAULT` row with `account: "-"` and `file: "missing"` is not.
210
210
 
211
211
  - Credentials already available: reuse them. Do not launch a browser.
212
- - A human needs to sign in: they run `neon login` (`neon auth` is an alias). An unattended agent must not launch browser authentication.
212
+ - A human needs to sign in: they run `neon login` (`neon auth` is an alias). An unattended agent must not launch browser authentication; with no credentials and nobody to finish a browser sign-in, it takes the Claimable Neon path below.
213
213
  - No account yet: follow [Starting without a Neon account](#starting-without-a-neon-account) for the Claimable Neon path.
214
214
 
215
215
  ### Combined setup: `neon init`
@@ -311,7 +311,9 @@ neon bootstrap
311
311
 
312
312
  ## Starting without a Neon account
313
313
 
314
- If the Getting Started account check found credentials, use them. If a command waits on a browser (`Awaiting authentication in web browser`) or authentication fails, stop and ask the user to sign in (`neon auth`) or mint an API key. Do not create a Claimable project as a substitute for a failed existing account.
314
+ If the Getting Started account check found credentials, use them. If those credentials fail to authenticate, stop and ask the user to sign in (`neon auth`). Do not create a Claimable project as a substitute for a failed existing account.
315
+
316
+ If the check found no credentials and nobody can finish a browser sign-in (an unattended run, or a command waits on `Awaiting authentication in web browser`), stop waiting and create the database with `npx neon@latest claim create`. It needs no Neon account, and the user claims the project later from the claim link; the next paragraph and its reference cover the flow. Use a Neon API key instead only when the user says they already have one; they set it as `NEON_API_KEY` in the session environment rather than pasting it into chat.
315
317
 
316
318
  If there is no Neon account yet, follow [references/claimable-neon.md](https://neon.com/docs/ai/skills/neon/references/claimable-neon.md). Do not run `neon init --agent` or `neon auth` on this path; those need a human Neon account. If `neon claim` is missing, the reference has the REST fallback. Unclaimed projects expire at `project_expires_at` (72 hours today). Claim codes expire in `expires_in` (15 minutes today). Functions, Object Storage, and AI Gateway report `requires_claim` before a human claims the project; report that and keep the denied capabilities. Add Auth with `neon.ts` and `neon deploy` when login is requested and no existing provider should be preserved. Add the Data API only for PostgREST / Supabase database-client compatibility or a migration that already depends on it.
317
319
 
@@ -370,7 +372,7 @@ neon config plan # dry-run diff of what apply would change (read-only)
370
372
  neon deploy --env <file> # apply neon.ts. Pass --env when Function env reads process.env. Alias for `neon config apply`
371
373
  ```
372
374
 
373
- `apply` / `deploy` provision the declared services **and then pull the branch's env into your local `.env.local`** (e.g. `Pulled 5 Neon variables into .env.local: DATABASE_URL, …`), so your local env always matches what's deployed.
375
+ `apply` / `deploy` provision the declared services **and then pull the branch's env into your local env file** (`.env` if it exists, otherwise `.env.local`) (e.g. `Pulled 5 Neon variables into .env.local: DATABASE_URL, …`), so your local env always matches what's deployed.
374
376
 
375
377
  ### Function env and `neon deploy`
376
378
 
@@ -460,7 +462,7 @@ Neon branches enable a branch-first development flow, which we recommend when us
460
462
  Create a Neon branch any time you would create a git branch. Use the following commands if you have CLI access:
461
463
 
462
464
  - `neon checkout <branch-name>` — Pins an existing branch by updating only the branch pointer in `.neon`. Pass `--create` to create a missing **name** (`neon checkout dev --create`). Run without a name for an interactive picker. It does not touch code or local Postgres.
463
- - `neon env pull` — Fetches the current branch's Neon environment variables into your `.env`. **`link` and `checkout` run this for you by default**, so you rarely call it directly.
465
+ - `neon env pull` — Fetches the current branch's Neon environment variables into your local env file (`.env` if it exists, otherwise `.env.local`). **`link` and `checkout` run this for you by default**, so you rarely call it directly.
464
466
  - `neon diff` — Shows the schema diff between the child branch and its parent. Run this to see what changes have been made to the schema since the last branch was created and before you commit your changes.
465
467
 
466
468
  ```bash
@@ -468,7 +470,7 @@ neon link # once; also pulls the linked branch's env
468
470
  neon checkout dev-add-search --create # per feature; also pulls the branch's env
469
471
  ```
470
472
 
471
- Because `link` and `checkout` pull env by default, the branch's `DATABASE_URL` lands in your local `.env` automatically — build against it, then `checkout` the next branch and repeat. As the agent, drive this loop yourself: run `checkout` between tasks.
473
+ Because `link` and `checkout` pull env by default, the branch's `DATABASE_URL` lands in your local env file automatically — build against it, then `checkout` the next branch and repeat. As the agent, drive this loop yourself: run `checkout` between tasks.
472
474
 
473
475
  ### How checkout composes with neon.ts
474
476
 
@@ -65,7 +65,7 @@ The AI Gateway is available on every Neon plan, including Free, and draws down p
65
65
 
66
66
  ### Enabling the gateway: credits and model access
67
67
 
68
- The AI Gateway is credential-gated rather than a provisioning step. `neon config apply` / `deploy`, `neon checkout`, and `neon env pull` mint the branch credential and write `NEON_AI_GATEWAY_BASE_URL` and `NEON_AI_GATEWAY_TOKEN` on every plan. Whether the account can serve a model is decided per request:
68
+ The AI Gateway is credential-gated rather than a provisioning step. On every plan, `neon env pull` resolves the branch credential and writes `NEON_AI_GATEWAY_BASE_URL` and `NEON_AI_GATEWAY_TOKEN` when `neon.ts` declares `aiGateway` or there is no `neon.ts`. With `aiGateway` declared, `neon config apply` / `deploy`, `neon link`, and `neon checkout` write them too. Whether the account can serve a model is decided per request:
69
69
 
70
70
  - **No card and credits yet → no model is enabled.** An account that hasn't added a card and bought AI Gateway credits, which includes every new Free account, gets every catalog model from `GET /v1/models` with `enabled: false`, `unavailable_reason: "paid_plan_required"`, and a `recovery_url` pointing at the organization's Billing page, and a request returns `403` with the same `unavailable_reason`. Despite the name, the fix is adding a card and buying credits, not upgrading the plan. `neon env pull` (and the env pull bundled into `apply` / `deploy` / `checkout`) warns when no model is enabled, names the reason, and links the `recovery_url`.
71
71
  - **Locked models.** `neon env pull` also warns when some models are enabled but no flagship model (e.g. Anthropic Opus, OpenAI Codex / `*-pro`) is among them, and links to the branch's AI Gateway page in the Neon Console (`https://console.neon.tech/app/projects/<project-id>/branches/<branch-id>/ai-gateway`). That page lists locked models under **Some models are restricted**, grouped by reason, each with its fix: **Add a card** and buy credits, **Add credits** for prepaid credits, or Support for an account restriction or a model not available to the account. After the user buys credits, models unlock once Neon confirms access. No CLI warning does not mean every model is enabled; check the model's `enabled` value. See https://neon.com/docs/ai-gateway/troubleshooting.md.
@@ -98,7 +98,7 @@ neon config plan # dry-run diff of what apply would change
98
98
  neon config apply # enable the gateway on the branch (neon deploy is an alias)
99
99
  ```
100
100
 
101
- The gateway is **branch-scoped**: each branch gets its own gateway host. When a `neon.ts` is present, `neon checkout` applies the policy as it _creates_ a branch, so a fresh preview/CI branch comes up with the gateway already enabled. Checking out an _existing_ branch doesn't reconcile it — run `neon deploy` to apply changes. Provisioning (`config apply` / `deploy`), `link`, and `checkout` also pull the branch's gateway credentials into your local `.env.local`, so local runs hit the same branch gateway as the deployed function (no manual `env pull` needed).
101
+ The gateway is **branch-scoped**: each branch gets its own gateway host. When a `neon.ts` is present, `neon checkout` applies the policy as it _creates_ a branch, so a fresh preview/CI branch comes up with the gateway already enabled. Checking out an _existing_ branch doesn't reconcile it — run `neon deploy` to apply changes. When `neon.ts` declares `aiGateway`, provisioning (`config apply` / `deploy`), `link`, and `checkout` also pull the branch's gateway credentials into your local env file (`.env` if it exists, otherwise `.env.local`), so local runs hit the same branch gateway as the deployed function (no manual `env pull` needed).
102
102
 
103
103
  ## Environment Variables
104
104
 
@@ -315,8 +315,8 @@ curl "$NEON_AI_GATEWAY_BASE_URL/v1/models" \
315
315
 
316
316
  **Getting the credentials for the request.** Both values come from the same branch-scoped Neon credential the gateway uses everywhere else — you never manage a provider key:
317
317
 
318
- - **Provision via `neon.ts` (recommended).** Enable `aiGateway` in `neon.ts` and run `neon deploy` (or `neon config apply`). Provisioning, `neon link`, and `neon checkout` pull `NEON_AI_GATEWAY_TOKEN` + `NEON_AI_GATEWAY_BASE_URL` into your local `.env.local`; inside a deployed Neon Function they're injected automatically. See **Setup** and **Environment Variables** above.
319
- - **Pull into the environment via CLI.** `neon env pull` writes the two vars to `.env`/`.env.local`, or `neon-env run -- <cmd>` injects them at runtime without a file — but only when `neon.ts` declares `aiGateway`; the vars are never pulled off branch state alone.
318
+ - **Provision via `neon.ts` (recommended).** Enable `aiGateway` in `neon.ts` and run `neon deploy` (or `neon config apply`). Provisioning, `neon link`, and `neon checkout` pull `NEON_AI_GATEWAY_TOKEN` + `NEON_AI_GATEWAY_BASE_URL` into your local env file (`.env` if it exists, otherwise `.env.local`); inside a deployed Neon Function they're injected automatically. See **Setup** and **Environment Variables** above.
319
+ - **Pull into the environment via CLI.** `neon env pull` writes the two vars to `.env`/`.env.local`. With a `neon.ts`, a bare `neon env pull` includes them only when `aiGateway` is declared. Without a `neon.ts`, a bare `neon env pull` includes them, but the pulls bundled into `init`, `link`, and `checkout` leave them out and remove ones an earlier pull wrote, so run `neon env pull` again after those commands, or declare `aiGateway` in `neon.ts` so every pull keeps them. `neon-env run -- <cmd>` injects the vars at runtime without a file and needs a `neon.ts` that declares `aiGateway`.
320
320
  - **Provision via the Console UI.** Enable the AI Gateway on the branch in the Neon Console and copy the branch's gateway base URL and a Neon credential (token) from the project's connection/credentials view.
321
321
 
322
322
  Any Neon credential (`nt_live_...`) valid for the branch works as the bearer token; `NEON_AI_GATEWAY_BASE_URL` is the bare branch host (no path).
@@ -42,7 +42,7 @@ Inspect existing identity and the required login features before provisioning. A
42
42
  | User asked to migrate from Supabase Auth | Managed Better Auth. [Supabase Auth](#supabase-auth). Moving only Postgres or adding a Function keeps Supabase Auth. |
43
43
  | Clerk, Auth.js, Supabase Auth, or another working IdP | Keep it unless the user asks to migrate. |
44
44
 
45
- Google, GitHub, Microsoft, Vercel, and Apple social OAuth are offered on Managed Auth. They are not a reason to leave Managed Auth. Microsoft and Apple need your own credentials: [Apple and Microsoft OAuth](#apple-and-microsoft-oauth). Making Neon Auth the OAuth server for your own MCP server or third-party OAuth clients is supported: [references/oauth-server.md](references/oauth-server.md). Other OAuth providers, generic OAuth, MFA, passkeys, API keys, SSO, custom plugins, hooks, and custom JWT claims are the [plugin matrix](#plugin-support) check.
45
+ Google, GitHub, Microsoft, Vercel, Apple, and Discord social OAuth are offered on Managed Auth. They are not a reason to leave Managed Auth. Microsoft, Apple, and Discord need your own credentials: [Apple, Microsoft, and Discord OAuth](#apple-microsoft-and-discord-oauth). Making Neon Auth the OAuth server for your own MCP server or third-party OAuth clients is supported: [references/oauth-server.md](references/oauth-server.md). Other OAuth providers, generic OAuth, MFA, passkeys, API keys, SSO, custom plugins, hooks, and custom JWT claims are the [plugin matrix](#plugin-support) check.
46
46
 
47
47
  Before enabling Managed Auth, confirm the project is on AWS and does not use IP Allow or Private Networking. Leave those protections in place.
48
48
 
@@ -107,14 +107,14 @@ A required plugin on the self-managed path is verified in that app's Better Auth
107
107
 
108
108
  ## Plugin support
109
109
 
110
- Checked 2026-10-30 against https://neon.com/docs/auth/guides/plugins.md, https://neon.com/docs/auth/guides/plugins/oauth-provider.md, https://neon.com/docs/auth/roadmap.md, and the `@neon/auth` client plugin list. Re-fetch those pages if this skill may be stale. An unlisted upstream plugin needs a live check; do not treat absence from this table as a dated roadmap item.
110
+ Checked 2026-10-30 against https://neon.com/docs/auth/guides/plugins.md, https://neon.com/docs/auth/guides/plugins/oauth-provider.md, https://neon.com/docs/auth/roadmap.md, and the `@neon/auth` client plugin list. Discord row checked 2026-11-11 against https://neon.com/docs/reference/api/auth/add-branch-neon-auth-oauth-provider.md; Discord: see [Apple, Microsoft, and Discord OAuth](#apple-microsoft-and-discord-oauth). Re-fetch those pages if this skill may be stale. An unlisted upstream plugin needs a live check; do not treat absence from this table as a dated roadmap item.
111
111
 
112
112
  "Not exposed" means the Managed SDK/UI contract. It is not a claim that every raw server request was tested.
113
113
 
114
114
  | Feature | Managed Auth | Boundary |
115
115
  | --- | --- | --- |
116
116
  | Email/password | Supported | `signUp.email`, `signIn.email` |
117
- | Social OAuth (Google, GitHub, Microsoft, Vercel, Apple) | Supported | `signIn.social`. Shared Google credentials are for development; production and GitHub/Vercel need your own OAuth apps. Microsoft and Apple always need your own ([details](#apple-and-microsoft-oauth)). https://neon.com/docs/auth/guides/setup-oauth.md |
117
+ | Social OAuth (Google, GitHub, Microsoft, Vercel, Apple, Discord) | Supported | `signIn.social`. Shared Google credentials are for development; production and GitHub/Vercel need your own OAuth apps. Microsoft, Apple, and Discord always need your own. Discord: see [details](#apple-microsoft-and-discord-oauth). https://neon.com/docs/auth/guides/setup-oauth.md |
118
118
  | Admin | Supported | Admin session required. Plugin customization is on the roadmap. |
119
119
  | Email OTP | Supported | Managed delivery. `emailOtp.sendVerificationOtp`, `signIn.emailOtp`. |
120
120
  | Magic Link | Supported | Enable on the branch (off by default). `signIn.magicLink`. |
@@ -123,7 +123,7 @@ Checked 2026-10-30 against https://neon.com/docs/auth/guides/plugins.md, https:/
123
123
  | Open API | Supported | Server routes `/reference` and `/open-api/generate-schema`. |
124
124
  | Phone Number | Supported with constraints | Browser client: existing users link a number, then sign in; no phone-first signup; own SMS webhook; custom UI. Next.js `auth.handler()` forwards the catch-all path, including phone OTP. A missing `auth.phoneNumber` server method is a missing typed helper, not a proxy rejection. https://neon.com/docs/auth/guides/plugins/phone-number.md |
125
125
  | MFA / Two-Factor | Roadmap | Unavailable on Managed Auth. If required: [self-managed.md](references/self-managed.md), after confirming the installed Better Auth version. |
126
- | Passkey, API Key, Generic OAuth, One Tap, Multi Session | Not exposed by Managed SDK/UI | If required: [self-managed.md](references/self-managed.md). Generic OAuth is not Google/GitHub/Microsoft/Vercel/Apple social sign-in. |
126
+ | Passkey, API Key, Generic OAuth, One Tap, Multi Session | Not exposed by Managed SDK/UI | If required: [self-managed.md](references/self-managed.md). Generic OAuth is not Google/GitHub/Microsoft/Vercel/Apple/Discord social sign-in. |
127
127
  | OAuth Provider (OAuth server, MCP auth) | Supported (beta) | Neon Auth is the OAuth 2.1 / OIDC server for your MCP server or third-party OAuth clients. You host the login and consent pages; no client credentials grant. See [references/oauth-server.md](references/oauth-server.md). |
128
128
  | SSO / SAML | Not listed or exposed | If required: [self-managed.md](references/self-managed.md), after confirming the installed Better Auth version. |
129
129
 
@@ -131,13 +131,15 @@ The default Managed client method is `getAnonymousToken()`. That JWT is a Neon a
131
131
 
132
132
  Trusted domains and webhooks are Neon settings, not installable Better Auth plugins.
133
133
 
134
- ## Apple and Microsoft OAuth
134
+ ## Apple, Microsoft, and Discord OAuth
135
135
 
136
- Both providers reject shared credentials; add them with your own via `neon neon-auth oauth-provider add|update` (Console and API work too). A multi-line secret goes in a file with `--oauth-client-secret-file`, not inline.
136
+ Apple, Microsoft, and Discord reject shared credentials. Add them with your own via `neon neon-auth oauth-provider add|update` (Console and API work too). A multi-line secret goes in a file with `--oauth-client-secret-file`, not inline.
137
137
 
138
138
  - **Apple**: `client_id` is the Services ID, `client_secret` is the full `.p8` private key. Also pass `--apple-team-id` and `--apple-key-id` (10 characters). Neon Auth signs the client-secret JWT itself, so there is nothing to rotate. Rotating the key needs the new `--apple-key-id` in the same update. The return URL must be HTTPS (`https://<auth host>/<db>/auth/callback/apple`); Apple rejects localhost, so test through a tunnel or a deployed preview.
139
139
  - **Microsoft**: `client_id` and `client_secret` from the Entra app registration. `--microsoft-tenant-id` is optional: `common` (default), `organizations`, `consumers`, a tenant GUID, or a domain. The redirect URI is `<base_url>/callback/microsoft`.
140
140
  - **Microsoft email verification**: an email counts as verified only when the ID token carries `xms_edov` = true and `acct` = 0. Add `xms_edov` and `acct` as optional ID-token claims in Entra. Without them, a same-email existing user gets `account_not_linked`, `link-social` fails with `unable_to_link_account`, and new users stay unverified.
141
+ - **Discord**: Always needs your own Discord application `client_id` and `client_secret` (shared is rejected on add and update). Better Auth only; legacy Stack Auth returns 422. Scopes are `identify` and `email`. Redirect URI `<base_url>/callback/discord`. With Neon CLI 9.5.0 or later, add or update it like Microsoft using `--provider-id discord`, `--oauth-client-id`, and `--oauth-client-secret-file` (preferred to keep the secret out of shell history). Delete it with `neon neon-auth oauth-provider delete --provider-id discord`. Older CLIs can use MCP `auth.oauthProviders.add|update|delete` or the API: https://neon.com/docs/reference/api/auth/add-branch-neon-auth-oauth-provider.md
142
+ - **Discord email verification**: an email counts as verified only when Discord's `verified` is the boolean `true`. An unverified Discord email cannot auto-link to an existing same-email user, and a new user from it is stored as unverified. A Discord account with no email fails with `email_not_found`.
141
143
 
142
144
  ## Trusted domains
143
145
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Use this page when the request is "let MCP clients sign in my users", "protect my MCP server with OAuth", or "let another app or OAuth client call my API on behalf of my users". Managed Better Auth is the OAuth 2.1 / OIDC authorization server (the OAuth provider plugin, beta, available to all Managed projects). Do not move to self-managed Better Auth for this, and keep the app's existing login method.
4
4
 
5
- "OAuth server" and "OAuth clients" here are not the social providers (Google, GitHub, Apple) of `neon neon-auth oauth-provider`. Those sign users in to Neon Auth. This page makes Neon Auth issue tokens to other apps.
5
+ "OAuth server" and "OAuth clients" here are not the social sign-in providers (`signIn.social`). Those sign users in to Neon Auth. This page makes Neon Auth issue tokens to other apps.
6
6
 
7
7
  - Docs: https://neon.com/docs/auth/guides/plugins/oauth-provider.md
8
8
  - Configuration is per branch: each branch has its own issuer, clients, and settings.
@@ -176,7 +176,7 @@ Report any step you could not run.
176
176
  ## Do NOT
177
177
 
178
178
  - Do not move to self-managed Better Auth or the Better Auth MCP plugin for this. Managed supports it.
179
- - Do not confuse this with `neon neon-auth oauth-provider` (social login) or Generic OAuth.
179
+ - Do not confuse this with `neon neon-auth oauth-provider` (`signIn.social` providers) or Generic OAuth.
180
180
  - Do not call `auth.oauth.resume()`, `getConsentRequest()`, or any resume helper. Use `oauth2.continue`, `oauth2.publicClient`, and `oauth2.consent`.
181
181
  - Do not put client secrets, or Neon API keys, in browser or mobile code.
182
182
  - Do not skip `iss` and `aud` checks, or trust a user id from tool input instead of `sub`.