@neon/skills 3.0.0 → 3.0.1
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
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.
|
|
4
|
+
"version": "3.0.1",
|
|
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",
|
|
@@ -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
|
|
|
@@ -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", "
|
|
13
|
-
branch", "schema-only branch", "reset branch",
|
|
14
|
-
bills, network transfer or egress, SELECT *
|
|
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
|
|
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
|
|