diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b55fa135..b681d9a9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "9.4.1" + ".": "9.5.0" } diff --git a/.stats.yml b/.stats.yml index 91f464e0..5b71b33a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-63947213d9359808abc05e4c3cb53389325ca23c58d06bf293626f7d5d4fc2b8.yml -openapi_spec_hash: 50e4669590de9a411915a612615017d0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-a1778dd040aadddb53b90df5959043d17a5c9899f82c9c7188cd0be810426dc3.yml +openapi_spec_hash: fe60fcf302d80a604a49ec1bf5068881 config_hash: d21a244fc073152c8dbecb8ece970209 diff --git a/CHANGELOG.md b/CHANGELOG.md index e2dbe386..e6442d93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 9.5.0 (2026-04-10) + +Full Changelog: [v9.4.1...v9.5.0](https://github.com/Finch-API/finch-api-node/compare/v9.4.1...v9.5.0) + +### Features + +* **api:** api update ([c7b1cbd](https://github.com/Finch-API/finch-api-node/commit/c7b1cbdd3b9ac244868c5c607cecfe6cae131563)) + + +### Chores + +* **internal:** codegen related update ([f00da2e](https://github.com/Finch-API/finch-api-node/commit/f00da2ec14ce454259e2a9040873be59896a8334)) +* **internal:** show error causes in MCP servers when running in local mode ([81a144e](https://github.com/Finch-API/finch-api-node/commit/81a144ea0a2f27f76e3879fbb809c56d8838fba7)) +* **mcp-server:** increase local docs search result count from 5 to 10 ([0a41abc](https://github.com/Finch-API/finch-api-node/commit/0a41abcf925d5568ee6705a1b724645e4fa60575)) + ## 9.4.1 (2026-04-06) Full Changelog: [v9.4.0...v9.4.1](https://github.com/Finch-API/finch-api-node/compare/v9.4.0...v9.4.1) diff --git a/package.json b/package.json index 074e02d9..5ff4fe1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tryfinch/finch-api", - "version": "9.4.1", + "version": "9.5.0", "description": "The official TypeScript library for the Finch API", "author": "Finch ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/manifest.json b/packages/mcp-server/manifest.json index 96fa85e5..7244b482 100644 --- a/packages/mcp-server/manifest.json +++ b/packages/mcp-server/manifest.json @@ -1,7 +1,7 @@ { "dxt_version": "0.2", "name": "@tryfinch/finch-api-mcp", - "version": "9.4.1", + "version": "9.5.0", "description": "The official MCP Server for the Finch API", "author": { "name": "Finch", diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 69941b10..2eab9d7e 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -1,6 +1,6 @@ { "name": "@tryfinch/finch-api-mcp", - "version": "9.4.1", + "version": "9.5.0", "description": "The official MCP Server for the Finch API", "author": "Finch ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/src/code-tool-worker.ts b/packages/mcp-server/src/code-tool-worker.ts index 8a6a5446..b8f7aa26 100644 --- a/packages/mcp-server/src/code-tool-worker.ts +++ b/packages/mcp-server/src/code-tool-worker.ts @@ -231,7 +231,8 @@ function makeSdkProxy(obj: T, { path, isBelievedBad = false }: function parseError(code: string, error: unknown): string | undefined { if (!(error instanceof Error)) return; - const message = error.name ? `${error.name}: ${error.message}` : error.message; + const cause = error.cause instanceof Error ? `: ${error.cause.message}` : ''; + const message = error.name ? `${error.name}: ${error.message}${cause}` : `${error.message}${cause}`; try { // Deno uses V8; the first ":LINE:COLUMN" is the top of stack. const lineNumber = error.stack?.match(/:([0-9]+):[0-9]+/)?.[1]; diff --git a/packages/mcp-server/src/docs-search-tool.ts b/packages/mcp-server/src/docs-search-tool.ts index f018e77a..b32ff477 100644 --- a/packages/mcp-server/src/docs-search-tool.ts +++ b/packages/mcp-server/src/docs-search-tool.ts @@ -63,7 +63,7 @@ async function searchLocal(args: Record): Promise { query, language, detail, - maxResults: 5, + maxResults: 10, }).results; } diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 1b7826f0..75533d00 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -2400,7 +2400,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [ ], response: '{ connect_url: string; session_id: string; }', markdown: - "## new\n\n`client.connect.sessions.new(customer_id: string, customer_name: string, products: string[], customer_email?: string, integration?: { provider: string; auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'; }, manual?: boolean, minutes_to_expire?: number, redirect_uri?: string, sandbox?: 'finch' | 'provider'): { connect_url: string; session_id: string; }`\n\n**post** `/connect/sessions`\n\nCreate a new connect session for an employer\n\n### Parameters\n\n- `customer_id: string`\n Unique identifier for the customer\n\n- `customer_name: string`\n Name of the customer\n\n- `products: string[]`\n The Finch products to request access to\n\n- `customer_email?: string`\n Email address of the customer\n\n- `integration?: { provider: string; auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'; }`\n Integration configuration for the connect session\n - `provider: string`\n The provider to integrate with\n - `auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'`\n The authentication method to use\n\n- `manual?: boolean`\n Enable manual authentication mode\n\n- `minutes_to_expire?: number`\n The number of minutes until the session expires (defaults to 129,600, which is 90 days)\n\n- `redirect_uri?: string`\n The URI to redirect to after the Connect flow is completed\n\n- `sandbox?: 'finch' | 'provider'`\n Sandbox mode for testing\n\n### Returns\n\n- `{ connect_url: string; session_id: string; }`\n\n - `connect_url: string`\n - `session_id: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst response = await client.connect.sessions.new({\n customer_id: 'x',\n customer_name: 'x',\n products: ['benefits'],\n});\n\nconsole.log(response);\n```", + "## new\n\n`client.connect.sessions.new(customer_id: string, customer_name: string, products: string[], customer_email?: string, integration?: { provider: string; auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'; }, manual?: boolean, minutes_to_expire?: number, redirect_uri?: string, sandbox?: 'finch' | 'provider'): { connect_url: string; session_id: string; }`\n\n**post** `/connect/sessions`\n\nCreate a new connect session for an employer\n\n### Parameters\n\n- `customer_id: string`\n Unique identifier for the customer\n\n- `customer_name: string`\n Name of the customer\n\n- `products: string[]`\n The Finch products to request access to. Use `benefits` to access deductions endpoints — `deduction` is a deprecated alias that is still accepted but should not be combined with `benefits`.\n\n- `customer_email?: string`\n Email address of the customer\n\n- `integration?: { provider: string; auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'; }`\n Integration configuration for the connect session\n - `provider: string`\n The provider to integrate with\n - `auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token'`\n The authentication method to use\n\n- `manual?: boolean`\n Enable manual authentication mode\n\n- `minutes_to_expire?: number`\n The number of minutes until the session expires (defaults to 129,600, which is 90 days)\n\n- `redirect_uri?: string`\n The URI to redirect to after the Connect flow is completed\n\n- `sandbox?: 'finch' | 'provider'`\n Sandbox mode for testing\n\n### Returns\n\n- `{ connect_url: string; session_id: string; }`\n\n - `connect_url: string`\n - `session_id: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst response = await client.connect.sessions.new({\n customer_id: 'x',\n customer_name: 'x',\n products: ['benefits'],\n});\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.Connect.Sessions.New', @@ -2454,7 +2454,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [ ], response: '{ connect_url: string; session_id: string; }', markdown: - "## reauthenticate\n\n`client.connect.sessions.reauthenticate(connection_id: string, minutes_to_expire?: number, products?: string[], redirect_uri?: string): { connect_url: string; session_id: string; }`\n\n**post** `/connect/sessions/reauthenticate`\n\nCreate a new Connect session for reauthenticating an existing connection\n\n### Parameters\n\n- `connection_id: string`\n The ID of the existing connection to reauthenticate\n\n- `minutes_to_expire?: number`\n The number of minutes until the session expires (defaults to 43,200, which is 30 days)\n\n- `products?: string[]`\n The products to request access to (optional for reauthentication)\n\n- `redirect_uri?: string`\n The URI to redirect to after the Connect flow is completed\n\n### Returns\n\n- `{ connect_url: string; session_id: string; }`\n\n - `connect_url: string`\n - `session_id: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst response = await client.connect.sessions.reauthenticate({ connection_id: 'connection_id' });\n\nconsole.log(response);\n```", + "## reauthenticate\n\n`client.connect.sessions.reauthenticate(connection_id: string, minutes_to_expire?: number, products?: string[], redirect_uri?: string): { connect_url: string; session_id: string; }`\n\n**post** `/connect/sessions/reauthenticate`\n\nCreate a new Connect session for reauthenticating an existing connection\n\n### Parameters\n\n- `connection_id: string`\n The ID of the existing connection to reauthenticate\n\n- `minutes_to_expire?: number`\n The number of minutes until the session expires (defaults to 43,200, which is 30 days)\n\n- `products?: string[]`\n The products to request access to (optional for reauthentication). Use `benefits` to access deductions endpoints — `deduction` is a deprecated alias that is still accepted but should not be combined with `benefits`.\n\n- `redirect_uri?: string`\n The URI to redirect to after the Connect flow is completed\n\n### Returns\n\n- `{ connect_url: string; session_id: string; }`\n\n - `connect_url: string`\n - `session_id: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst response = await client.connect.sessions.reauthenticate({ connection_id: 'connection_id' });\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.Connect.Sessions.Reauthenticate', diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 6a75b3d4..5f3489ad 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -29,7 +29,7 @@ export const newMcpServer = async ({ new McpServer( { name: 'tryfinch_finch_api_api', - version: '9.4.1', + version: '9.5.0', }, { instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }), diff --git a/packages/mcp-server/src/util.ts b/packages/mcp-server/src/util.ts index 40ed5501..069a2b47 100644 --- a/packages/mcp-server/src/util.ts +++ b/packages/mcp-server/src/util.ts @@ -2,9 +2,9 @@ export const readEnv = (env: string): string | undefined => { if (typeof (globalThis as any).process !== 'undefined') { - return (globalThis as any).process.env?.[env]?.trim(); + return (globalThis as any).process.env?.[env]?.trim() || undefined; } else if (typeof (globalThis as any).Deno !== 'undefined') { - return (globalThis as any).Deno.env?.get?.(env)?.trim(); + return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined; } return; }; diff --git a/src/internal/utils/env.ts b/src/internal/utils/env.ts index 2d848007..cc5fa0fa 100644 --- a/src/internal/utils/env.ts +++ b/src/internal/utils/env.ts @@ -9,10 +9,10 @@ */ export const readEnv = (env: string): string | undefined => { if (typeof (globalThis as any).process !== 'undefined') { - return (globalThis as any).process.env?.[env]?.trim() ?? undefined; + return (globalThis as any).process.env?.[env]?.trim() || undefined; } if (typeof (globalThis as any).Deno !== 'undefined') { - return (globalThis as any).Deno.env?.get?.(env)?.trim(); + return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined; } return undefined; }; diff --git a/src/resources/connect/sessions.ts b/src/resources/connect/sessions.ts index 9f8e734b..0132d9de 100644 --- a/src/resources/connect/sessions.ts +++ b/src/resources/connect/sessions.ts @@ -63,7 +63,9 @@ export interface SessionNewParams { customer_name: string; /** - * The Finch products to request access to + * The Finch products to request access to. Use `benefits` to access deductions + * endpoints — `deduction` is a deprecated alias that is still accepted but should + * not be combined with `benefits`. */ products: Array< | 'benefits' @@ -140,7 +142,9 @@ export interface SessionReauthenticateParams { minutes_to_expire?: number; /** - * The products to request access to (optional for reauthentication) + * The products to request access to (optional for reauthentication). Use + * `benefits` to access deductions endpoints — `deduction` is a deprecated alias + * that is still accepted but should not be combined with `benefits`. */ products?: Array< | 'benefits' diff --git a/src/version.ts b/src/version.ts index 4dd360ac..fde92279 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '9.4.1'; // x-release-please-version +export const VERSION = '9.5.0'; // x-release-please-version