@neon/tools 2.9.0 → 2.11.0

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/README.md CHANGED
@@ -102,6 +102,14 @@ Paginated lists call `.all()` and return the item array. Do not pass a cursor; t
102
102
  const createBranch = createNeonTool("branches.createAndConnect", { apiKey });
103
103
  ```
104
104
 
105
+ `incidents.list` (`list_incidents`) is the exception to the credential rule. It reads neonstatus.com, needs no credential, and never sends one, so it works for anonymous agents:
106
+
107
+ ```ts
108
+ const incidents = createNeonTool("incidents.list", {});
109
+ const { data } = await incidents.execute({});
110
+ // { status: "operational", incidents: [], maintenance: [], affected_components: [], ... }
111
+ ```
112
+
105
113
  ## Writes and waiting
106
114
 
107
115
  Tools run with `waitForReadiness: true`. When a mutation response includes an `operations` array, the call waits until those operations finish. The default deadline is five minutes (`wait.timeoutMs`). Pass `wait: { timeoutMs: 30_000 }` on `createNeonTools` or `createNeonTool` to bound that. Set it below the host's own tool-call timeout, otherwise the host gives up first.
@@ -114,7 +122,7 @@ An abort `signal` on `execute` or a wait timeout stops the poll, not the create:
114
122
 
115
123
  `metadata.method` and `metadata.path` name the first request; extra readiness GETs are not listed there.
116
124
 
117
- These public client methods are not tools: `operations.waitFor`, `postgres.roles.password`, `storage.objects.get`, and `credentials.reveal`. Waiting is what the write tools already do. `realtime.secret` is a GET that requires approval: it returns the branch's Realtime secret, which an application backend seals queries with. After `realtime.rotateSecret`, it returns the new value once `pending` is `false`. `projects.create` and `branches.create` return the created resource without a connection string; `createAndConnect` returns a URI. `triggers.create` and `triggers.update` take the OpenAPI discriminator as a nested `body` field. `credentials.rotate` requires approval and is not idempotent: a lost success already replaced the secret; create a replacement and revoke the rotated credential.
125
+ These public client methods are not tools: `operations.waitFor`, `postgres.roles.password`, `storage.objects.get`, `credentials.reveal`, `logs.loki.labels`, and `logs.loki.labelValues`. Waiting is what the write tools already do. Loki labels are the log fields, so `logs.fields` and `logs.fieldValues` are the discovery tools for both `logs.query` and `logs.loki.queryRange`; the latter returns Loki's response, with lines grouped by stream labels, and nanosecond timestamp strings. `realtime.secret` is a GET that requires approval: it returns the branch's Realtime secret, which an application backend seals queries with. After `realtime.rotateSecret`, it returns the new value once `pending` is `false`. `projects.create` and `branches.create` return the created resource without a connection string; `createAndConnect` returns a URI. `triggers.create` and `triggers.update` take the OpenAPI discriminator as a nested `body` field. `credentials.rotate` requires approval and is not idempotent: a lost success already replaced the secret; create a replacement and revoke the rotated credential.
118
126
 
119
127
  ## Roles
120
128