@neon/tools 2.14.1 → 2.14.3

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.
@@ -20,7 +20,7 @@ const toolDescriptions = {
20
20
  "branches.update": "Renames a branch, protects or unprotects it, or sets when it expires.",
21
21
  "branches.delete": "Deletes a branch with all its data and disconnects its clients. NEVER run autonomously; always ask the user first. The root, the default, and a branch with children cannot be deleted. For the whole project, use {{projects.delete}}.",
22
22
  "branches.setDefault": "Makes a branch the project's default; the previous default loses the flag.",
23
- "branches.finalizeRestore": "Finalizes a branch restored with finalize false: moves the original branch's computes onto it, restarting them, and takes over its name.",
23
+ "branches.finalizeRestore": "Finalizes a branch restored with finalize false: moves the original branch's computes onto it, restarting them, and takes over its name. NEVER run autonomously; always ask the user first.",
24
24
  "postgres.endpoints.list": "Lists the compute endpoints of every branch in a project. For one branch, use {{postgres.endpoints.listByBranch}}.",
25
25
  "postgres.endpoints.listByBranch": "Lists a branch's compute endpoints. For every branch in the project, use {{postgres.endpoints.list}}.",
26
26
  "postgres.endpoints.get": "Gets a compute endpoint (ep-...), including its host and state.",
@@ -1 +1 @@
1
- {"version":3,"file":"composed.d.ts","sourceRoot":"","sources":["../../../src/lib/ergonomic/composed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AASzB,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAwD1E,eAAO,MAAM,uBAAuB;;;;;;;;;;kBAuBjC,CAAC;AAEJ,eAAO,MAAM,iCAAiC;;;;;;;;;;kBAQ5C,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAEnC,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAG7C,CAAC;AAEH,e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;;;;EAyBvD,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,SAAS,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B5D,CAAC;AAEH,eAAO,MAAM,iBAAiB,GAAI,SAAS,iBAAiB;;;;;;;;;;;EA0C1D,CAAC;AAEH,eAAO,MAAM,oBAAoB,GAAI,SAAS,iBAAiB;;;;;;;yDAgC7D,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,SAAS,iBAAiB;;;;;;;;;;;;;;;;;;;;EA8CvD,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,SAAS,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B5D,CAAC;AAEH,eAAO,MAAM,eAAe,GAAI,SAAS,iBAAiB;;;;;;;;;;;;;;mDA4BxD,CAAC"}
@@ -143,8 +143,8 @@ const restoreSnapshotInputSchema = z.strictObject({
143
143
  project_id: zRestoreSnapshotPath.shape.project_id.describe(pathInputDescriptions.project_id),
144
144
  snapshot_id: zRestoreSnapshotPath.shape.snapshot_id,
145
145
  name: zRestoreSnapshotBody.shape.name,
146
- target_branch_id: zRestoreSnapshotBody.shape.target_branch_id,
147
- finalize: z.boolean().describe("Move computes onto the restored branch now. Default true for a new branch, false onto an existing one.").optional()
146
+ target_branch_id: zRestoreSnapshotBody.shape.target_branch_id.describe("Branch that finalize replaces. Defaults to the snapshot's source branch."),
147
+ finalize: z.boolean().describe("Replace the target branch with the restored data now. Default false.").optional()
148
148
  });
149
149
  const snapshotFrequency = z.enum([
150
150
  "daily",
@@ -359,7 +359,7 @@ const restoreSnapshotTool = (options) => bindTool(options, {
359
359
  operationId: "snapshots.restore",
360
360
  id: publishedId("snapshots.restore"),
361
361
  title: "Restore snapshot",
362
- description: "Restores a snapshot onto a new branch or onto target_branch_id and waits until it is ready. With finalize false, swap it in later with {{branches.finalizeRestore}}.",
362
+ description: "Restores a snapshot into a new branch and waits until it is ready. finalize true replaces target_branch_id (default: the snapshot's source branch) with it. NEVER finalize autonomously; ask the user first. Swap in later with {{branches.finalizeRestore}}.",
363
363
  inputSchema: restoreSnapshotInputSchema,
364
364
  annotations: writeAnnotations,
365
365
  requiresApproval: true,
@@ -1 +1 @@
1
- {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/lib/result.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAsC/D,eAAO,MAAM,YAAY,GAAU,KAAK,EACvC,OAAO,KAAK,KACV,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAExC,CAAC"}
1
+ {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/lib/result.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA8C/D,eAAO,MAAM,YAAY,GAAU,KAAK,EACvC,OAAO,KAAK,KACV,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAExC,CAAC"}
@@ -7,6 +7,7 @@ async function toJsonSafe(value) {
7
7
  if (value instanceof Blob) return encodeBlob(value);
8
8
  if (value instanceof Date) return value.toISOString();
9
9
  if (Array.isArray(value)) return Promise.all(value.map(toJsonSafe));
10
+ if (typeof value === "object" && "toJSON" in value && typeof value.toJSON === "function") return toJsonSafe(value.toJSON());
10
11
  if (typeof value === "object") {
11
12
  const entries = await Promise.all(Object.entries(value).map(async ([key, child]) => [key, await toJsonSafe(child)]));
12
13
  return Object.fromEntries(entries);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neon/tools",
3
- "version": "2.14.1",
3
+ "version": "2.14.3",
4
4
  "description": "Agent tools for the Neon SDK ergonomic client, compatible with MCP, Eve, and Mastra.",
5
5
  "keywords": [
6
6
  "neon",
@@ -70,7 +70,7 @@
70
70
  "dependencies": {
71
71
  "@neondatabase/serverless": "1.0.0",
72
72
  "zod": "^4.5.4",
73
- "@neon/sdk": "7.13.0"
73
+ "@neon/sdk": "7.13.1"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@hey-api/openapi-ts": "0.98.2",