Skip to content

release: 0.1.0-alpha.27 #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.26"
".": "0.1.0-alpha.27"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 1
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-2a67e842b87576472f1969d75642637db0f0f42fc805a61ab3b880e544941595.yml
openapi_spec_hash: 7cf70aa93bf241c1d1460f48182e9819
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/benchify%2Fbenchify-882428dc42061ac58fad8814f920a7afec0a8fb54bb744e8e709b27156b8afb3.yml
openapi_spec_hash: 4778a24a07fa3aafa7a9befb36579c19
config_hash: 935baad1727a1116efdc14e9ce6e4405
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## 0.1.0-alpha.27 (2025-08-18)

Full Changelog: [v0.1.0-alpha.26...v0.1.0-alpha.27](https://github.com/Benchify/benchify-sdk/compare/v0.1.0-alpha.26...v0.1.0-alpha.27)

### Features

* **api:** api update ([38868ee](https://github.com/Benchify/benchify-sdk/commit/38868ee05dcb933892f6832bf774a82920b3e859))
* **api:** api update ([dc63afb](https://github.com/Benchify/benchify-sdk/commit/dc63afb29c6736cabe999255ecb8e92d3bfbb763))
* **api:** api update ([8d0d58a](https://github.com/Benchify/benchify-sdk/commit/8d0d58adfb215d36ffbc970a8bd28f1ad4e6da78))
* **api:** api update ([585d01e](https://github.com/Benchify/benchify-sdk/commit/585d01e40f89c2d7a4cde9cbda7efcb65b5b70b4))


### Bug Fixes

* **mcp:** generate additionalProperties=true for map schemas to avoid validation issues ([cf925ad](https://github.com/Benchify/benchify-sdk/commit/cf925ad24dc8709fe0ed65ea1616fec5571496e9))


### Chores

* **deps:** update dependency @types/node to v20.17.58 ([6efc5bf](https://github.com/Benchify/benchify-sdk/commit/6efc5bfe43b91566e490952b551dbd3bb5a33085))
* **internal:** codegen related update ([2c2d91b](https://github.com/Benchify/benchify-sdk/commit/2c2d91b26fc1c2084ebe5fefe223ba3533ee1e20))
* **internal:** formatting change ([bf8be45](https://github.com/Benchify/benchify-sdk/commit/bf8be452e307ff976370b534681457ca5bcb52c0))
* **mcp:** document remote server in README.md ([a9436b7](https://github.com/Benchify/benchify-sdk/commit/a9436b77e2c2e5880a66c7e56202284bf52b2118))
* **mcp:** minor cleanup of types and package.json ([4457795](https://github.com/Benchify/benchify-sdk/commit/4457795b4f1314342ab309c840ad1fe3a3ae1f31))
* **mcp:** update README ([bf15c28](https://github.com/Benchify/benchify-sdk/commit/bf15c28363dcbed6ca86e84358efff64631893b4))

## 0.1.0-alpha.26 (2025-08-11)

Full Changelog: [v0.1.0-alpha.25...v0.1.0-alpha.26](https://github.com/Benchify/benchify-sdk/compare/v0.1.0-alpha.25...v0.1.0-alpha.26)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "benchify",
"version": "0.1.0-alpha.26",
"version": "0.1.0-alpha.27",
"description": "The official TypeScript library for the Benchify API",
"author": "Benchify <>",
"types": "dist/index.d.ts",
Expand Down
26 changes: 26 additions & 0 deletions packages/mcp-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,32 @@ over time, you can manually enable or disable certain capabilities:
--resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards
```

## Running remotely

Launching the client with `--transport=http` launches the server as a remote server using Streamable HTTP transport. The `--port` setting can choose the port it will run on, and the `--socket` setting allows it to run on a Unix socket.

Authorization can be provided via the `Authorization` header using the Bearer scheme.

Additionally, authorization can be provided via the following headers:
| Header | Equivalent client option | Security scheme |
| -------------------- | ------------------------ | --------------- |
| `x-benchify-api-key` | `apiKey` | ApiKeyAuth |

A configuration JSON for this server might look like this, assuming the server is hosted at `http://localhost:3000`:

```json
{
"mcpServers": {
"benchify_api": {
"url": "http://localhost:3000",
"headers": {
"Authorization": "Bearer <auth value>"
}
}
}
}
```

## Importing the tools and server individually

```js
Expand Down
5 changes: 3 additions & 2 deletions packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "benchify-mcp",
"version": "0.1.0-alpha.26",
"version": "0.1.0-alpha.27",
"description": "The official MCP Server for the Benchify API",
"author": "Benchify <>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -30,7 +30,7 @@
"benchify": "file:../../dist/",
"@modelcontextprotocol/sdk": "^1.11.5",
"express": "^5.1.0",
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.2/jq-web.tar.gz",
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz",
"yargs": "^17.7.2",
"@cloudflare/cabidela": "^0.2.4",
"zod": "^3.25.20",
Expand All @@ -42,6 +42,7 @@
"devDependencies": {
"@types/jest": "^29.4.0",
"@types/express": "^5.0.3",
"@types/yargs": "^17.0.8",
"@typescript-eslint/eslint-plugin": "8.31.1",
"@typescript-eslint/parser": "8.31.1",
"eslint": "^8.49.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/mcp-server/src/filtering.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// @ts-nocheck
import initJq from 'jq-web';

export async function maybeFilter(args: Record<string, unknown> | undefined, response: any): Promise<any> {
const jqFilter = args?.['jq_filter'];
export async function maybeFilter(jqFilter: unknown | undefined, response: any): Promise<any> {
if (jqFilter && typeof jqFilter === 'string') {
return await jq(response, jqFilter);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const del = async (req: express.Request, res: express.Response) => {
});
};

export const streamableHTTPApp = (options: McpOptions) => {
export const streamableHTTPApp = (options: McpOptions): express.Express => {
const app = express();
app.use(express.json());

Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const newMcpServer = () =>
new McpServer(
{
name: 'benchify_api',
version: '0.1.0-alpha.26',
version: '0.1.0-alpha.27',
},
{ capabilities: { tools: {}, logging: {} } },
);
Expand Down
20 changes: 18 additions & 2 deletions packages/mcp-server/src/tools/fixer/run-fixer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const metadata: Metadata = {
export const tool: Tool = {
name: 'run_fixer',
description:
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nHandle fixer requests to process and fix TypeScript files.\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'WrappedFixerResponse',\n description: 'Wrapped response model for benchify-api compatibility',\n properties: {\n data: {\n type: 'object',\n title: 'FixerResponse',\n description: 'The actual response data',\n properties: {\n files_processed: {\n type: 'integer',\n title: 'Files Processed',\n description: 'Number of files processed'\n },\n status: {\n type: 'object',\n title: 'FixerStatus',\n description: 'Final per-file status after fixing',\n properties: {\n file_to_status: {\n type: 'object',\n title: 'File To Status',\n description: 'Fix status of each file sent.'\n }\n }\n },\n fixed_files: {\n type: 'object',\n title: 'Fixed Files',\n description: 'Information about fixed files'\n },\n suggested_changes: {\n anyOf: [ {\n type: 'object',\n title: 'DiffFormat',\n properties: {\n diff: {\n type: 'string',\n title: 'Diff',\n description: 'Git diff of changes made'\n }\n }\n },\n {\n type: 'object',\n title: 'ChangedFilesFormat',\n properties: {\n changed_files: {\n type: 'array',\n title: 'Changed Files',\n description: 'List of changed files with their new contents',\n items: {\n $ref: '#/$defs/file_change'\n }\n }\n }\n },\n {\n type: 'object',\n title: 'AllFilesFormat',\n properties: {\n all_files: {\n type: 'array',\n title: 'All Files',\n description: 'List of all files with their current contents',\n items: {\n $ref: '#/$defs/file_change'\n }\n }\n }\n }\n ],\n title: 'Suggested Changes',\n description: 'Changes made by the fixer in the requested format'\n }\n },\n required: [ 'files_processed',\n 'status'\n ]\n },\n error: {\n type: 'object',\n title: 'ResponseError',\n description: 'The error from the API query',\n properties: {\n code: {\n type: 'string',\n title: 'Code',\n description: 'The error code'\n },\n message: {\n type: 'string',\n title: 'Message',\n description: 'The error message'\n },\n details: {\n type: 'string',\n title: 'Details',\n description: 'Details about what caused the error, if available'\n },\n suggestions: {\n type: 'array',\n title: 'Suggestions',\n description: 'Potential suggestions about how to fix the error, if applicable',\n items: {\n type: 'string'\n }\n }\n },\n required: [ 'code',\n 'message'\n ]\n },\n meta: {\n $ref: '#/$defs/response_meta'\n }\n },\n required: [ 'data'\n ],\n $defs: {\n file_change: {\n type: 'object',\n title: 'FileChange',\n description: 'Model for a single file change',\n properties: {\n contents: {\n type: 'string',\n title: 'Contents',\n description: 'Contents of the file'\n },\n path: {\n type: 'string',\n title: 'Path',\n description: 'Path of the file'\n }\n },\n required: [ 'contents',\n 'path'\n ]\n },\n response_meta: {\n type: 'object',\n title: 'ResponseMeta',\n description: 'Meta information for API responses',\n properties: {\n external_id: {\n type: 'string',\n title: 'External Id',\n description: 'Customer tracking identifier'\n },\n trace_id: {\n type: 'string',\n title: 'Trace Id',\n description: 'Unique trace identifier for the request'\n }\n }\n }\n }\n}\n```",
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nHandle fixer requests to process and fix TypeScript files.\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'WrappedFixerResponse',\n description: 'Wrapped response model for benchify-api compatibility',\n properties: {\n data: {\n type: 'object',\n title: 'FixerResponse',\n description: 'The actual response data',\n properties: {\n status: {\n type: 'object',\n title: 'FixerStatus',\n description: 'Final per-file status after fixing',\n properties: {\n file_to_status: {\n type: 'object',\n title: 'File To Status',\n description: 'Fix status of each file sent.',\n additionalProperties: true\n }\n }\n },\n bundled_files: {\n type: 'array',\n title: 'Bundled Files',\n description: 'Bundled files',\n items: {\n $ref: '#/$defs/file_change'\n }\n },\n suggested_changes: {\n anyOf: [ {\n type: 'object',\n title: 'DiffFormat',\n properties: {\n diff: {\n type: 'string',\n title: 'Diff',\n description: 'Git diff of changes made'\n }\n }\n },\n {\n type: 'object',\n title: 'ChangedFilesFormat',\n properties: {\n changed_files: {\n type: 'array',\n title: 'Changed Files',\n description: 'List of changed files with their new contents',\n items: {\n $ref: '#/$defs/file_change'\n }\n }\n }\n },\n {\n type: 'object',\n title: 'AllFilesFormat',\n properties: {\n all_files: {\n type: 'array',\n title: 'All Files',\n description: 'List of all files with their current contents',\n items: {\n $ref: '#/$defs/file_change'\n }\n }\n }\n }\n ],\n title: 'Suggested Changes',\n description: 'Changes made by the fixer in the requested format'\n }\n },\n required: [ 'status'\n ]\n },\n error: {\n type: 'object',\n title: 'ResponseError',\n description: 'The error from the API query',\n properties: {\n code: {\n type: 'string',\n title: 'Code',\n description: 'The error code'\n },\n message: {\n type: 'string',\n title: 'Message',\n description: 'The error message'\n },\n details: {\n type: 'string',\n title: 'Details',\n description: 'Details about what caused the error, if available'\n },\n suggestions: {\n type: 'array',\n title: 'Suggestions',\n description: 'Potential suggestions about how to fix the error, if applicable',\n items: {\n type: 'string'\n }\n }\n },\n required: [ 'code',\n 'message'\n ]\n },\n meta: {\n $ref: '#/$defs/response_meta'\n }\n },\n required: [ 'data'\n ],\n $defs: {\n file_change: {\n type: 'object',\n title: 'FileChange',\n description: 'Model for a single file change',\n properties: {\n contents: {\n type: 'string',\n title: 'Contents',\n description: 'Contents of the file'\n },\n path: {\n type: 'string',\n title: 'Path',\n description: 'Path of the file'\n }\n },\n required: [ 'contents',\n 'path'\n ]\n },\n response_meta: {\n type: 'object',\n title: 'ResponseMeta',\n description: 'Meta information for API responses',\n properties: {\n external_id: {\n type: 'string',\n title: 'External Id',\n description: 'Customer tracking identifier'\n },\n trace_id: {\n type: 'string',\n title: 'Trace Id',\n description: 'Unique trace identifier for the request'\n }\n }\n }\n }\n}\n```",
inputSchema: {
type: 'object',
properties: {
Expand All @@ -45,10 +45,26 @@ export const tool: Tool = {
required: ['contents', 'path'],
},
},
bundle: {
type: 'boolean',
title: 'Bundle',
description: 'Whether to bundle the project (experimental)',
},
fix_types: {
type: 'array',
title: 'Fix Types',
description: 'Configuration for which fix types to apply',
items: {
type: 'string',
title: 'FixTypeName',
description: 'Enumeration of available fix types',
enum: ['import_export', 'string_literals', 'css', 'tailwind', 'ai_fallback', 'types'],
},
},
fixes: {
type: 'object',
title: 'FixConfigObject',
description: 'Configuration object for specifying which fixes to apply',
description: 'DEPRECATED: legacy boolean flags for which fixes to apply.',
properties: {
css: {
type: 'boolean',
Expand Down
2 changes: 2 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,9 @@ export class Benchify {
});
}
}

Benchify.Fixer = Fixer;

export declare namespace Benchify {
export type RequestOptions = Opts.RequestOptions;

Expand Down
79 changes: 38 additions & 41 deletions src/resources/fixer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,13 @@ export interface DiagnosticResponse {
* Diagnostics grouped by file
*/
file_to_diagnostics?: { [key: string]: Array<DiagnosticResponse.FileToDiagnostic> };

/**
* Human-readable summary of issues
*/
summary?: string;

/**
* Total number of diagnostics
*/
total_count?: number;
}

export namespace DiagnosticResponse {
/**
* Enhanced diagnostic model for external API
*/
export interface FileToDiagnostic {
/**
* Category of diagnostic
*/
category: 'typescript';

/**
* File where diagnostic occurs
*/
Expand All @@ -67,6 +52,18 @@ export namespace DiagnosticResponse {
*/
message: string;

/**
* Type of the diagnostic
*/
type:
| 'type_error'
| 'string_literal'
| 'import_export'
| 'implicit_any'
| 'implicit_any_array'
| 'invalid_jsx'
| 'unclassified';

/**
* Code given by the diagnostic generator
*/
Expand All @@ -76,11 +73,6 @@ export namespace DiagnosticResponse {
* Surrounding code context
*/
context?: string | null;

/**
* Diagnostic category
*/
severity?: 'error' | 'warning';
}

export namespace FileToDiagnostic {
Expand Down Expand Up @@ -151,20 +143,15 @@ export namespace FixerRunResponse {
* The actual response data
*/
export interface Data {
/**
* Number of files processed
*/
files_processed: number;

/**
* Final per-file status after fixing
*/
status: Data.Status;

/**
* Information about fixed files
* Bundled files
*/
fixed_files?: { [key: string]: unknown } | null;
bundled_files?: Array<FixerAPI.FileChange> | null;

/**
* Changes made by the fixer in the requested format
Expand Down Expand Up @@ -238,7 +225,17 @@ export interface FixerRunParams {
files: Array<FixerRunParams.File>;

/**
* Configuration object for specifying which fixes to apply
* Whether to bundle the project (experimental)
*/
bundle?: boolean;

/**
* Configuration for which fix types to apply
*/
fix_types?: Array<'import_export' | 'string_literals' | 'css' | 'tailwind' | 'ai_fallback' | 'types'>;

/**
* @deprecated DEPRECATED: legacy boolean flags for which fixes to apply.
*/
fixes?: FixerRunParams.Fixes | null;

Expand Down Expand Up @@ -275,38 +272,38 @@ export namespace FixerRunParams {
}

/**
* Configuration object for specifying which fixes to apply
* @deprecated DEPRECATED: legacy boolean flags for which fixes to apply.
*/
export interface Fixes {
/**
* Whether to fix CSS issues
* @deprecated Whether to fix CSS issues
*/
css?: boolean;
css?: boolean | null;

/**
* Whether to fix import issues
* @deprecated Whether to fix import issues
*/
imports?: boolean;
imports?: boolean | null;

/**
* Whether to fix React issues
* @deprecated Whether to fix React issues
*/
react?: boolean;
react?: boolean | null;

/**
* Whether to fix string literal issues
* @deprecated Whether to fix string literal issues
*/
stringLiterals?: boolean;
stringLiterals?: boolean | null;

/**
* Whether to fix Tailwind issues
* @deprecated Whether to fix Tailwind issues
*/
tailwind?: boolean;
tailwind?: boolean | null;

/**
* Whether to fix TypeScript suggestions
* @deprecated Whether to fix TypeScript suggestions
*/
tsSuggestions?: boolean;
tsSuggestions?: boolean | null;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.1.0-alpha.26'; // x-release-please-version
export const VERSION = '0.1.0-alpha.27'; // x-release-please-version
Loading