Skip to content
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
11 changes: 1 addition & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"type": "module",
"dependencies": {
"@clack/prompts": "^0.11.0",
"@modelcontextprotocol/sdk": "^1.22.0",
"@modelcontextprotocol/sdk": "^1.24.0",
"@repomix/tree-sitter-wasms": "^0.1.15",
"@secretlint/core": "^11.2.5",
"@secretlint/secretlint-rule-preset-recommend": "^11.2.5",
Expand Down
7 changes: 1 addition & 6 deletions src/mcp/prompts/packRemoteRepositoryPrompts.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// @ts-nocheck - Zod v3 compatibility for MCP SDK (imported by mcpAction.ts)
// Note: @ts-expect-error would be preferable, but the type incompatibility extends
// beyond .shape to the entire handler function signature, causing 9+ type errors per file.
// This will be resolved when MCP SDK supports Zod v4.
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { z } from 'zod/v3';
import { z } from 'zod';

/**
* Register Repomix-related prompts to the MCP server
Expand All @@ -29,7 +25,6 @@ export const registerPackRemoteRepositoryPrompt = (mcpServer: McpServer) => {
),
},
async ({ repository, includePatterns, ignorePatterns }) => {
// Convert compress string to boolean
return {
messages: [
{
Expand Down
12 changes: 3 additions & 9 deletions src/mcp/tools/attachPackedOutputTool.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
// @ts-nocheck - Zod v3 compatibility for MCP SDK (imported by mcpAction.ts)
// Note: @ts-expect-error would be preferable, but the type incompatibility extends
// beyond .shape to the entire handler function signature, causing 9+ type errors per file.
// This will be resolved when MCP SDK supports Zod v4.
import fs from 'node:fs/promises';
import path from 'node:path';
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod/v3';
import { z } from 'zod';
import { defaultFilePathMap } from '../../config/configSchema.js';
import type { ProcessedFile } from '../../core/file/fileTypes.js';
import {
Expand Down Expand Up @@ -259,10 +255,8 @@ This tool accepts either a directory containing a repomix output file or a direc
Supports multiple formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators).
Calling the tool again with the same file path will refresh the content if the file has been updated.
It will return in that case a new output ID and the updated content.`,
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
inputSchema: attachPackedOutputInputSchema.shape as any,
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
outputSchema: attachPackedOutputOutputSchema.shape as any,
inputSchema: attachPackedOutputInputSchema,
outputSchema: attachPackedOutputOutputSchema,
annotations: {
readOnlyHint: true,
destructiveHint: false,
Expand Down
12 changes: 3 additions & 9 deletions src/mcp/tools/fileSystemReadDirectoryTool.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
// @ts-nocheck - Zod v3 compatibility for MCP SDK (imported by mcpAction.ts)
// Note: @ts-expect-error would be preferable, but the type incompatibility extends
// beyond .shape to the entire handler function signature, causing 9+ type errors per file.
// This will be resolved when MCP SDK supports Zod v4.
import fs from 'node:fs/promises';
import path from 'node:path';
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod/v3';
import { z } from 'zod';
import { logger } from '../../shared/logger.js';
import { buildMcpToolErrorResponse, buildMcpToolSuccessResponse } from './mcpToolRuntime.js';

Expand All @@ -32,10 +28,8 @@ export const registerFileSystemReadDirectoryTool = (mcpServer: McpServer) => {
title: 'Read Directory',
description:
'List the contents of a directory using an absolute path. Returns a formatted list showing files and subdirectories with clear [FILE]/[DIR] indicators. Useful for exploring project structure and understanding codebase organization.',
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
inputSchema: fileSystemReadDirectoryInputSchema.shape as any,
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
outputSchema: fileSystemReadDirectoryOutputSchema.shape as any,
inputSchema: fileSystemReadDirectoryInputSchema,
outputSchema: fileSystemReadDirectoryOutputSchema,
annotations: {
readOnlyHint: true,
destructiveHint: false,
Expand Down
12 changes: 3 additions & 9 deletions src/mcp/tools/fileSystemReadFileTool.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
// @ts-nocheck - Zod v3 compatibility for MCP SDK (imported by mcpAction.ts)
// Note: @ts-expect-error would be preferable, but the type incompatibility extends
// beyond .shape to the entire handler function signature, causing 9+ type errors per file.
// This will be resolved when MCP SDK supports Zod v4.
import fs from 'node:fs/promises';
import path from 'node:path';
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod/v3';
import { z } from 'zod';
import { createSecretLintConfig, runSecretLint } from '../../core/security/workers/securityCheckWorker.js';
import { logger } from '../../shared/logger.js';
import { buildMcpToolErrorResponse, buildMcpToolSuccessResponse } from './mcpToolRuntime.js';
Expand All @@ -33,10 +29,8 @@ export const registerFileSystemReadFileTool = (mcpServer: McpServer) => {
title: 'Read File',
description:
'Read a file from the local file system using an absolute path. Includes built-in security validation to detect and prevent access to files containing sensitive information (API keys, passwords, secrets).',
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
inputSchema: fileSystemReadFileInputSchema.shape as any,
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
outputSchema: fileSystemReadFileOutputSchema.shape as any,
inputSchema: fileSystemReadFileInputSchema,
outputSchema: fileSystemReadFileOutputSchema,
annotations: {
readOnlyHint: true,
destructiveHint: false,
Expand Down
12 changes: 3 additions & 9 deletions src/mcp/tools/grepRepomixOutputTool.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
// @ts-nocheck - Zod v3 compatibility for MCP SDK (imported by mcpAction.ts)
// Note: @ts-expect-error would be preferable, but the type incompatibility extends
// beyond .shape to the entire handler function signature, causing 9+ type errors per file.
// This will be resolved when MCP SDK supports Zod v4.
import fs from 'node:fs/promises';
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod/v3';
import { z } from 'zod';
import { logger } from '../../shared/logger.js';
import {
buildMcpToolErrorResponse,
Expand Down Expand Up @@ -88,10 +84,8 @@ export const registerGrepRepomixOutputTool = (mcpServer: McpServer) => {
title: 'Grep Repomix Output',
description:
'Search for patterns in a Repomix output file using grep-like functionality with JavaScript RegExp syntax. Returns matching lines with optional context lines around matches.',
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
inputSchema: grepRepomixOutputInputSchema.shape as any,
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
outputSchema: grepRepomixOutputOutputSchema.shape as any,
inputSchema: grepRepomixOutputInputSchema,
outputSchema: grepRepomixOutputOutputSchema,
annotations: {
readOnlyHint: true,
destructiveHint: false,
Expand Down
1 change: 0 additions & 1 deletion src/mcp/tools/mcpToolRuntime.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-nocheck - Zod v3 compatibility for MCP SDK (imported by mcpAction.ts)
import crypto from 'node:crypto';
import fs from 'node:fs/promises';
import os from 'node:os';
Expand Down
12 changes: 3 additions & 9 deletions src/mcp/tools/packCodebaseTool.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
// @ts-nocheck - Zod v3 compatibility for MCP SDK (imported by mcpAction.ts)
// Note: @ts-expect-error would be preferable, but the type incompatibility extends
// beyond .shape to the entire handler function signature, causing 9+ type errors per file.
// This will be resolved when MCP SDK supports Zod v4.
import path from 'node:path';
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod/v3';
import { z } from 'zod';
import { runCli } from '../../cli/cliRun.js';
import type { CliOptions } from '../../cli/types.js';
import { defaultFilePathMap } from '../../config/configSchema.js';
Expand Down Expand Up @@ -68,10 +64,8 @@ export const registerPackCodebaseTool = (mcpServer: McpServer) => {
title: 'Pack Local Codebase',
description:
'Package a local code directory into a consolidated file for AI analysis. This tool analyzes the codebase structure, extracts relevant code content, and generates a comprehensive report including metrics, file tree, and formatted code content. Supports multiple output formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators). Also supports Tree-sitter compression for efficient token usage.',
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
inputSchema: packCodebaseInputSchema.shape as any,
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
outputSchema: packCodebaseOutputSchema.shape as any,
inputSchema: packCodebaseInputSchema,
outputSchema: packCodebaseOutputSchema,
annotations: {
readOnlyHint: true,
destructiveHint: false,
Expand Down
12 changes: 3 additions & 9 deletions src/mcp/tools/packRemoteRepositoryTool.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
// @ts-nocheck - Zod v3 compatibility for MCP SDK (imported by mcpAction.ts)
// Note: @ts-expect-error would be preferable, but the type incompatibility extends
// beyond .shape to the entire handler function signature, causing 9+ type errors per file.
// This will be resolved when MCP SDK supports Zod v4.
import path from 'node:path';
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod/v3';
import { z } from 'zod';
import { runCli } from '../../cli/cliRun.js';
import type { CliOptions } from '../../cli/types.js';
import { defaultFilePathMap } from '../../config/configSchema.js';
Expand Down Expand Up @@ -72,10 +68,8 @@ export const registerPackRemoteRepositoryTool = (mcpServer: McpServer) => {
title: 'Pack Remote Repository',
description:
'Fetch, clone, and package a GitHub repository into a consolidated file for AI analysis. This tool automatically clones the remote repository, analyzes its structure, and generates a comprehensive report. Supports multiple output formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators). Also supports various GitHub URL formats and includes security checks to prevent exposure of sensitive information.',
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
inputSchema: packRemoteRepositoryInputSchema.shape as any,
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
outputSchema: packRemoteRepositoryOutputSchema.shape as any,
inputSchema: packRemoteRepositoryInputSchema,
outputSchema: packRemoteRepositoryOutputSchema,
annotations: {
readOnlyHint: true,
destructiveHint: false,
Expand Down
12 changes: 3 additions & 9 deletions src/mcp/tools/readRepomixOutputTool.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
// @ts-nocheck - Zod v3 compatibility for MCP SDK (imported by mcpAction.ts)
// Note: @ts-expect-error would be preferable, but the type incompatibility extends
// beyond .shape to the entire handler function signature, causing 9+ type errors per file.
// This will be resolved when MCP SDK supports Zod v4.
import fs from 'node:fs/promises';
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod/v3';
import { z } from 'zod';
import { logger } from '../../shared/logger.js';
import {
buildMcpToolErrorResponse,
Expand Down Expand Up @@ -44,10 +40,8 @@ export const registerReadRepomixOutputTool = (mcpServer: McpServer) => {
title: 'Read Repomix Output',
description:
'Read the contents of a Repomix-generated output file. Supports partial reading with line range specification for large files. This tool is designed for environments where direct file system access is limited (e.g., web-based environments, sandboxed applications). For direct file system access, use standard file operations.',
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
inputSchema: readRepomixOutputInputSchema.shape as any,
// biome-ignore lint/suspicious/noExplicitAny: Zod v3 compatibility for MCP SDK
outputSchema: readRepomixOutputOutputSchema.shape as any,
inputSchema: readRepomixOutputInputSchema,
outputSchema: readRepomixOutputOutputSchema,
annotations: {
readOnlyHint: true,
destructiveHint: false,
Expand Down
12 changes: 0 additions & 12 deletions src/mcp/tsconfig.json

This file was deleted.

Loading