2.24.1 (#453)
* 2.24.1 - Updated dependencies - MCP Server: better compatibility with Windows - MCP Server: allow using a custom root for better flexibility - Version Check: use package.json version instead of number of commits - Prettier: reformatted some files - Add SSH_AUTH_SOCK to dev passThroughEnv to solve SSH issues; handle execSync errors - Use GIT_SSH to fix SSH issues on Windows - Updated Stripe version - Updated application version from 2.24.0 to 2.24.1 in package.json. - Enhanced error handling in billing services to include error causes for better debugging.
This commit is contained in:
committed by
GitHub
parent
f3ac595d06
commit
ca585e09be
@@ -1,19 +1,16 @@
|
||||
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
||||
import { execFile } from 'node:child_process';
|
||||
import { access, readFile, stat } from 'node:fs/promises';
|
||||
import { Socket } from 'node:net';
|
||||
import { join } from 'node:path';
|
||||
import { promisify } from 'node:util';
|
||||
|
||||
import { execFileAsync } from '../../lib/process-utils';
|
||||
import {
|
||||
type KitStatusDeps,
|
||||
createKitStatusService,
|
||||
} from './kit-status.service';
|
||||
import { KitStatusInputSchema, KitStatusOutputSchema } from './schema';
|
||||
|
||||
const execFileAsync = promisify(execFile);
|
||||
|
||||
export function registerKitStatusTool(server: McpServer) {
|
||||
export function registerKitStatusTool(server: McpServer, rootPath?: string) {
|
||||
return server.registerTool(
|
||||
'kit_status',
|
||||
{
|
||||
@@ -25,7 +22,7 @@ export function registerKitStatusTool(server: McpServer) {
|
||||
const parsedInput = KitStatusInputSchema.parse(input);
|
||||
|
||||
try {
|
||||
const service = createKitStatusService(createKitStatusDeps());
|
||||
const service = createKitStatusService(createKitStatusDeps(rootPath));
|
||||
const status = await service.getStatus(parsedInput);
|
||||
|
||||
return {
|
||||
@@ -54,9 +51,7 @@ export function registerKitStatusTool(server: McpServer) {
|
||||
);
|
||||
}
|
||||
|
||||
function createKitStatusDeps(): KitStatusDeps {
|
||||
const rootPath = process.cwd();
|
||||
|
||||
function createKitStatusDeps(rootPath = process.cwd()): KitStatusDeps {
|
||||
return {
|
||||
rootPath,
|
||||
async readJsonFile(path: string): Promise<unknown> {
|
||||
|
||||
Reference in New Issue
Block a user