@neon/skills 3.0.0 → 3.0.2

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.0",
3
+ "version": "3.0.2",
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.0",
4
+ "version": "3.0.2",
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",
@@ -517,6 +517,6 @@ neon feedback --message "Describe what failed, including the command and sanitiz
517
517
 
518
518
  If that check fails, inspect the available Neon MCP tools and use `send_feedback` only when it is present and can run without asking the user to authenticate, configure tooling, or approve the request. If neither option is available, skip feedback silently. Do not install, upgrade, authenticate, or configure tooling only to send feedback.
519
519
 
520
- No need to tell the user whether feedback was sent. The goal is to improve the user's experience without interrupting or getting in the way of their current work. If submission fails, do not retry or mention the failure. Finish the user's task normally.
520
+ The goal is to improve the user's experience without interrupting or getting in the way of their current work. If submission fails, do not retry. Finish the user's task normally.
521
521
 
522
522
  **Never send secrets or sensitive data.** Remove credentials, tokens, API keys, passwords, personal or customer data, and confidential project details from the report. Send only the issue report described above; do not collect or infer analytics.
@@ -38,7 +38,7 @@ export default defineConfig({
38
38
  neon claim create --service auth --service data-api --env-pull
39
39
  ```
40
40
 
41
- The project is created in `aws-us-east-2` unless you pass `--region-id` (for example `neon claim create --region-id aws-eu-central-1`). Pick the region closest to where the app runs. A project's region cannot change after create.
41
+ The project is created in `aws-us-east-2` unless you pass `--region-id` (for example `neon claim create --region-id aws-eu-central-1`). Pick the region closest to where the app runs. A project's region cannot change after create. Pass `--project-name <name>` to name the project; it keeps the name after the claim.
42
42
 
43
43
  `neon claim create` reads `neon.ts` when it is present. It writes provisioned vars to an existing `.env`, otherwise `.env.local`, and gitignores that file. If `.env` or `.env.local` already has a `DATABASE_URL` (or other Neon-managed keys), pass `--file <path>` or `--no-env-pull`. The identity assertion is the pre-claim credential.
44
44
 
@@ -61,14 +61,15 @@ Check these preconditions before setting anything up:
61
61
 
62
62
  The AI Gateway is currently available in `aws-us-east-2`, `aws-us-east-1`, `aws-eu-central-1`, and `aws-ap-southeast-1`. Confirm the user's project is in one of these regions.
63
63
 
64
- The AI Gateway is available on paid Neon plans only (Launch and Scale) and draws down prepaid AI Gateway credits. Any paid account with prepaid credits can call every model in the catalog. See https://neon.com/docs/ai-gateway/prepaid-credits.md.
64
+ The AI Gateway is available on every Neon plan, including Free, and draws down prepaid AI Gateway credits. On the Free plan, the user adds a payment card and buys credits on the **Billing** page; the organization stays on Free. Any account with prepaid credits can call every model in the catalog, with no difference in pricing or model access between plans. See https://neon.com/docs/ai-gateway/prepaid-credits.md.
65
65
 
66
- ### Enabling the gateway: plan and model access
66
+ ### Enabling the gateway: credits and model access
67
67
 
68
- The AI Gateway is credential-gated rather than a provisioning step. The CLI surfaces both plan and model-access limits:
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:
69
69
 
70
- - **Free plan → provisioning is blocked.** `neon config apply` / `deploy` and `neon checkout` **refuse** to enable the gateway on a Free plan (the gateway can't serve requests there), with a friendly "upgrade to a paid plan, or remove `aiGateway`" error. A dry-run `neon config plan` and `neon env pull` don't provision, so they only **warn**. So: to use the gateway the project's account must be on a paid Neon plan.
71
- - **Paid plan with locked models.** `GET /v1/models` lists every catalog model and marks the ones the account can't call yet with `enabled: false`. `neon env pull` (and the env pull bundled into `apply` / `deploy` / `checkout`) 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: **Upgrade plan** for a paid plan, **Add credits** for prepaid credits, or Support for an account restriction or a model not available to the account. After the user upgrades or 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.
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
+ - **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.
72
+ - **Older CLI.** `neon` 8.23.3 and earlier refuse `aiGateway` on a Free plan with "isn't available on the Free plan". Update with `npm i -g neon@latest` (8.23.4 or later) and re-run.
72
73
 
73
74
  ## Setup
74
75
 
@@ -501,7 +501,7 @@ pool
501
501
  - **Scale to Zero:** ✅ preserved — polling stops when no clients are connected, so the compute suspends on its normal timer.
502
502
  - **Ordering:** `WHERE id > cursor` can skip a row that commits out of sequence: a transaction that took a lower id but commits after a higher one is already behind the cursor, so the poll never returns it. For a broadcast feed occasional loss is usually fine; when you need every row, use `LISTEN`/`NOTIFY` or poll by `created_at` with a small overlap window and dedupe by id.
503
503
 
504
- **2. `LISTEN`/`NOTIFY` — lowest latency, but requires disabling Scale to Zero.** Each isolate `LISTEN`s on a channel over a dedicated **unpooled** connection; broadcasting is `NOTIFY`, so every isolate (including the sender's) re-pushes to its sockets. Near-instant — but the listener holds an idle connection that **does not count as active**, so [Scale to Zero](https://neon.com/docs/introduction/scale-to-zero) suspends the compute and drops it, silently killing the feed. Only use it on an **always-on** compute (Scale to Zero disabled — a paid-plan setting).
504
+ **2. `LISTEN`/`NOTIFY` — lowest latency, but requires disabling Scale to Zero.** Each isolate `LISTEN`s on a channel over a dedicated **unpooled** connection; broadcasting is `NOTIFY`, so every isolate (including the sender's) re-pushes to its sockets. Near-instant — but the listener holds an idle connection that **does not count as active**, so [Scale to Zero](https://neon.com/docs/introduction/scale-to-zero) suspends the compute and drops it, silently killing the feed. Only use it on an **always-on** compute (Scale to Zero disabled — a paid-plan setting: `neon postgres computes update <compute-id> --suspend-timeout -1`).
505
505
 
506
506
  ```typescript
507
507
  import { attachDatabasePool } from "@neon/functions";
@@ -9,10 +9,10 @@ description: >-
9
9
  an existing DATABASE_URL, SQL, schema, inspect, or search. New backends, Auth,
10
10
  files, Functions, and LLM calls go to the parent `neon` skill. Live queries,
11
11
  reactive UIs, and realtime data go to `neon-realtime`. Also use for
12
- "@neondatabase/serverless", "@neon/neon-js", "neon inspect db", "Neon
13
- branch", "schema-only branch", "reset branch", "branch per PR", high database
14
- bills, network transfer or egress, SELECT * optimization, query overfetching,
15
- "semantic search", "vector search", "full-text search", "BM25", or "hybrid
12
+ "@neondatabase/serverless", "@neon/neon-js", "neon inspect db", "neon
13
+ postgres computes", "Neon branch", "schema-only branch", "reset branch",
14
+ "branch per PR", high database bills, network transfer or egress, SELECT *
15
+ optimization, query overfetching, "semantic search", "vector search", "full-text search", "BM25", or "hybrid
16
16
  search".
17
17
  metadata:
18
18
  parent: neon
@@ -192,10 +192,27 @@ Because `ANALYZE` executes the statement, use it only when execution is safe; do
192
192
 
193
193
  Use MCP `list_slow_queries` instead of `inspect_database` when the user specifically needs queries ranked by average execution time with a custom threshold and limit. Outside the explicit `EXPLAIN` case above, use `run_sql` only for read-only diagnostic SQL when the predefined checks do not answer the question.
194
194
 
195
+ ## Computes
196
+
197
+ Use this when the user wants to resize a compute, change its scale-to-zero timeout, or start, suspend, restart, or delete it.
198
+
199
+ Manage computes with `neon postgres computes`. `neon pg` and `neon lakebase` are aliases of `neon postgres`.
200
+
201
+ ```bash
202
+ neon postgres computes list # --branch <branch> or the branch .neon pins; --all-branches for the project
203
+ neon postgres computes get <compute-id>
204
+ neon postgres computes update <compute-id> --cu 0.25-2 --suspend-timeout 300
205
+ neon postgres computes restart <compute-id> # also start, suspend, delete
206
+ ```
207
+
208
+ `update` sends only the flags you pass (`--cu`, `--suspend-timeout`, `--name`, `--disabled`) and fails when you pass none. Each change waits until Neon applies it; `update`, `start`, `suspend`, and `restart` then print the compute. With `--no-wait` the command returns once the API accepts the change; find the operation with `neon operations list` and check it with `neon operations get <operation-id>`. Add a compute, such as a read replica, with `neon branches add-compute <branch>`.
209
+
195
210
  ## Autoscaling
196
211
 
197
212
  Use this when the user needs compute to scale automatically with workload and wants guidance on CU sizing and runtime behavior.
198
213
 
214
+ Set a compute's autoscaling range with `neon postgres computes update <compute-id> --cu <min>-<max>` (for example `--cu 0.25-2`), or a fixed size with `--cu 2`.
215
+
199
216
  Link: https://neon.com/docs/introduction/autoscaling.md
200
217
 
201
218
  ## Scale to Zero
@@ -204,7 +221,7 @@ Use this when optimizing idle costs and discussing suspend/resume behavior, incl
204
221
 
205
222
  Key points:
206
223
 
207
- - Idle computes suspend automatically after a default of 5 minutes; the timeout is configurable, and suspension can only be disabled on the Launch and Scale plans.
224
+ - Idle computes suspend automatically after a default of 5 minutes. Change the timeout with `neon postgres computes update <compute-id> --suspend-timeout <seconds>`: `0` uses the plan default and `-1` disables suspension. Free cannot change it, Launch can only enable or disable suspension, and Scale can set any value from 60 to 604800 (one week).
208
225
  - First query after suspend typically has a cold-start penalty (around hundreds of ms)
209
226
  - Storage remains active while compute is suspended.
210
227
 
@@ -81,7 +81,7 @@ Use Neon's provider with the Vercel AI SDK. Requirements:
81
81
 
82
82
  - Install the tested versions: `npm install @neon/ai-sdk-provider@1.1.0 ai@7.0.133`. Decision models require AI SDK 7.0.133+; pin versions and retest upgrades while `experimental_decide` is experimental.
83
83
  - Load the same `NEON_AI_GATEWAY_TOKEN` and `NEON_AI_GATEWAY_BASE_URL` used for [embeddings](vector-search.md#prepare-embeddings); the provider handles the endpoint and credentials.
84
- - The AI Gateway, for both Jev and embeddings, requires a paid Neon plan with prepaid AI Gateway credits. Without them, embed documents and queries with one model from another provider and use [RRF](#rrf-example).
84
+ - The AI Gateway, for both Jev and embeddings, requires prepaid AI Gateway credits, available on every Neon plan, including Free. Without them, embed documents and queries with one model from another provider and use [RRF](#rrf-example).
85
85
 
86
86
  ```typescript
87
87
  import { neon } from "@neon/ai-sdk-provider";
@@ -35,7 +35,7 @@ CREATE TABLE documents (
35
35
  );
36
36
  ```
37
37
 
38
- The AI Gateway is available on paid Neon plans only (Launch and Scale) and draws down prepaid AI Gateway credits. If a model shows `enabled: false` in `GET /v1/models`, the branch's AI Gateway page in the Neon Console lists the reason and the fix. See the `neon-ai-gateway` skill.
38
+ The AI Gateway is available on every Neon plan, including Free, and draws down prepaid AI Gateway credits. If a model shows `enabled: false` in `GET /v1/models`, the branch's AI Gateway page in the Neon Console lists the reason and the fix. See the `neon-ai-gateway` skill.
39
39
 
40
40
  Enable the AI Gateway on the branch and get `NEON_AI_GATEWAY_TOKEN` and the bare-host `NEON_AI_GATEWAY_BASE_URL`:
41
41
 
@@ -155,7 +155,7 @@ Migrating from Electric: Realtime is a drop-in replacement for Electric's role i
155
155
 
156
156
  - **New app:** `neon bootstrap my-app --template realtime-react`, then `neon deploy` in `my-app`.
157
157
  - **Enable** it on the linked branch with [`neon realtime enable --allowed-origin <app origin>`](https://neon.com/docs/cli/realtime.md), or declare [`preview: { realtime: true }`](https://neon.com/docs/reference/neon-ts.md#realtime) in `neon.ts` (`neon config add realtime`) and run `neon deploy`. Child branches inherit it. It's unavailable on Claimable projects until claimed, or outside the [supported regions](https://neon.com/docs/realtime/overview.md#which-regions-is-it-enabled-in).
158
- - **Tables** need a [stable replica identity](references/queries.md#table-requirements); a primary key is enough.
158
+ - **Tables** need a [stable replica identity](references/queries.md#table-requirements); a primary key is enough. Leave [row-level security](references/queries.md#why-not-row-level-security) off on every table a live query reads: Realtime rejects those subscriptions with `unsupported query: row security`. For per-user data, authorize in the sealed query instead (see below).
159
159
  - **Environment:** `neon env pull --service postgres --service realtime` writes `DATABASE_URL`, `NEON_REALTIME_URL` and `NEON_REALTIME_SECRET`. Expose only the URL to the browser, under your framework's public prefix (like `VITE_`). `url` options take `NEON_REALTIME_URL`; `db` takes the database name from `DATABASE_URL`.
160
160
  - **Install** `@neon/realtime` and the packages chosen above. Use these SDKs, not the still-evolving WebSocket protocol.
161
161