├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── claude-code-server ├── .env.example ├── build │ └── index.js ├── package-lock.json ├── src │ ├── declarations.d.ts │ └── index.ts └── tsconfig.json ├── package.json └── pnpm-lock.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | dist 93 | 94 | # Gatsby files 95 | .cache/ 96 | # Comment in the public line in if your project uses Gatsby and not Next.js 97 | # https://nextjs.org/blog/next-9-1#public-directory-support 98 | # public 99 | 100 | # vuepress build output 101 | .vuepress/dist 102 | 103 | # vuepress v2.x temp and cache directory 104 | .temp 105 | .cache 106 | 107 | # Docusaurus cache and generated files 108 | .docusaurus 109 | 110 | # Serverless directories 111 | .serverless/ 112 | 113 | # FuseBox cache 114 | .fusebox/ 115 | 116 | # DynamoDB Local files 117 | .dynamodb/ 118 | 119 | # TernJS port file 120 | .tern-port 121 | 122 | # Stores VSCode versions used for testing VSCode extensions 123 | .vscode-test 124 | 125 | # yarn v2 126 | .yarn/cache 127 | .yarn/unplugged 128 | .yarn/build-state.yml 129 | .yarn/install-state.gz 130 | .pnp.* 131 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile for claude-code-mcp 2 | FROM node:18-alpine 3 | 4 | # Set working directory 5 | WORKDIR /app 6 | 7 | # Install dependencies 8 | RUN apk add --no-cache git 9 | 10 | # Clone the repository 11 | RUN git clone https://github.com/KunihiroS/claude-code-mcp.git 12 | 13 | # Change directory to the server 14 | WORKDIR /app/claude-code-mcp/claude-code-server 15 | 16 | # Install npm dependencies 17 | RUN npm install 18 | 19 | # Build the project 20 | RUN npm run build 21 | 22 | # Expose port if needed (optional, adjust if your MCP server needs a specific port) 23 | EXPOSE 3000 24 | 25 | # Command to run the server 26 | CMD ["node", "build/index.js"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 KunihiroS 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # claude-code-mcp Project 2 | 3 | ## [0.1.3] - 2025-05-08 4 | 5 | ### Changed 6 | - Enhanced security by strictly validating the `CLAUDE_BIN` environment variable. The server now verifies the executable's path, name, existence, and permissions before use. 7 | 8 | ### Fixed 9 | - Addressed a potential command injection vulnerability related to the `CLAUDE_BIN` environment variable. 10 | 11 | ## Overview 12 | 13 | The claude-code-mcp project is an MCP server for Claude Code. 14 | 15 | It calls the locally installed Claude Code command and provides the following tools: `explain_code`, `review_code`, `fix_code`, `edit_code`, `test_code`, `simulate_command`, and `your_own_query`. The server is implemented using Node.js and the MCP SDK, receiving JSON format requests from clients via stdio. Internally, it adopts Base64 encoding to smoothly process special characters (newlines, quotation marks, etc.) in natural language text, resulting in improved stability and flexibility. Its main roles are receiving requests, encoding input, generating and executing commands, and returning execution results in JSON format. 16 | This project has been confirmed to work in Claude Code CLI environments (Ubuntu/WSL2, etc.). 17 | 18 | 19 | claude-code-mcp MCP server 20 | 21 | 22 | 💡 23 | MCP Host with less capable LLM, can tame and make use of Claude power💪! 24 | With claude-code-mcp, you can also call Claude Code from Claude Desktop!! 😇😜😎 (unconfirmed) 25 | 26 | ## Functions 27 | 28 | The main roles of the server are: 29 | 30 | - **Request Reception:** Receive JSON format tool requests from clients (e.g. `code`, `context`, `focus_areas`, etc.). 31 | - **Input Processing:** Internally Base64 encode the received natural language text. 32 | - **Tool Selection and Command Generation:** Based on the tool name in the request, assemble a command string for the query using a fixed template or free format (`your_own_query`). 33 | - **Command Execution:** Use Node.js's `child_process.spawn` to execute the assembled command and get the result from standard output. 34 | - **Result Return:** Return the execution result to the client in JSON format. 35 | 36 | ## Getting Started 37 | 38 | ### Prerequisites 39 | 40 | - Node.js (>= v18 recommended, tested with v22.14.0) 41 | - npm (or yarn) 42 | - Claude Code command installed and auth completed. 43 | https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview 44 | 45 | ### Installation & Usage 46 | 47 | There are several ways to use `claude-code-mcp`: 48 | 49 | **1. Using npx (Recommended for quick use)** 50 | 51 | You can run the server directly without installation using `npx`: 52 | 53 | ```bash 54 | npx @kunihiros/claude-code-mcp 55 | ``` 56 | 57 | **2. Global Installation** 58 | 59 | Install the package globally: 60 | 61 | ```bash 62 | npm install -g claude-code-mcp 63 | ``` 64 | 65 | Then, you can run it as a command: 66 | 67 | ```bash 68 | claude-code-mcp 69 | ``` 70 | 71 | **3. Local Installation (For development)** 72 | 73 | Clone the repository and install dependencies: 74 | 75 | ```bash 76 | git clone https://github.com/KunihiroS/claude-code-mcp.git 77 | cd claude-code-mcp/claude-code-server 78 | npm install 79 | npm run build 80 | ``` 81 | You can then run the built script directly: 82 | ```bash 83 | node build/index.js 84 | ``` 85 | 86 | ### Configuration 87 | 88 | **Environment Variables:** 89 | 90 | Regardless of the installation method, you need to configure the environment variables. Create **one** of the following files: 91 | 92 | 1. **Using MCP Host Settings (Recommended for `npx`):** Configure environment variables directly within your MCP Host's settings (see "MCP Host Configuration" below). This is the easiest way when using `npx`. 93 | 2. **Using a `.env` file:** Create a `.env` file in the directory where you run the `npx @kunihiros/claude-code-mcp` command. 94 | 3. **Using a global config file:** Create a `.claude-code-mcp.env` file in your home directory (`~/.claude-code-mcp.env`). 95 | 96 | If using a file (`.env` or `~/.claude-code-mcp.env`), add the following content, adjusting the `CLAUDE_BIN` path: 97 | 98 | ```dotenv 99 | # .env or ~/.claude-code-mcp.env 100 | CLAUDE_BIN=/path/to/your/claude/executable # REQUIRED: Set the full path to your Claude CLI 101 | LOG_LEVEL=info # Optional: Set log level (e.g., debug, info, warn, error) 102 | ``` 103 | 104 | **MCP Host Configuration (Recommended for `npx`):** 105 | 106 | Add the following to your MCP Host application settings (e.g., Claude Desktop settings). This method allows you to set environment variables directly. 107 | 108 | ```json 109 | "claude-code-server": { 110 | "command": "npx", 111 | "args": [ 112 | "-y", 113 | "@kunihiros/claude-code-mcp" 114 | ], 115 | "env": { 116 | "CLAUDE_BIN": "/path/to/your/claude/executable", // REQUIRED: Set the absolute path 117 | "LOG_LEVEL": "info" // Optional: Set log level 118 | }, 119 | "disabled": false 120 | } 121 | ``` 122 | *(Restarting the host application might be required.)* 123 | 124 | **Alternative MCP Host Configuration (Global Install / Local Dev):** 125 | 126 | If you installed the package globally or are running it locally from the cloned repository, and the `claude-code-mcp` command is in your system's PATH, you can use: 127 | 128 | ```json 129 | "claude-code-server": { 130 | "command": "claude-code-mcp", 131 | "disabled": false 132 | } 133 | ``` 134 | In this case, you **must** configure environment variables using a `.env` file or the global `~/.claude-code-mcp.env` file as described above. 135 | 136 | ## Environment Variables Details 137 | 138 | This server uses the following environment variables (set via MCP Host `env` settings, `.env`, or `~/.claude-code-mcp.env`): 139 | 140 | - `CLAUDE_BIN`: Specifies the path to the Claude CLI executable. **(Required)** 141 | Example: `/home/linuxbrew/.linuxbrew/bin/claude` or `C:\Users\YourUser\AppData\Local\bin\claude.exe` 142 | - `LOG_LEVEL`: Specifies the log level. (Optional, defaults to `info`). Possible values: `debug`, `info`, `warn`, `error`. 143 | 144 | ## Available Tools 145 | 146 | The `claude-code-mcp` server provides the following tools: 147 | 148 | - `explain_code`: Provides a detailed explanation of the given code. 149 | - `review_code`: Reviews the given code. 150 | - `fix_code`: Fixes bugs or issues in the given code. 151 | - `edit_code`: Edits the given code based on instructions. 152 | - `test_code`: Generates tests for the given code. 153 | - `simulate_command`: Simulates the execution of a given command. 154 | - `your_own_query`: Sends a custom query with context. 155 | 156 | ## Note 157 | 158 | - Log file (`claude-code-mcp.log`) location: 159 | - Attempts to create in the project root first. 160 | - Falls back to the user's home directory (`~/.claude-code-mcp.log`). 161 | - Finally falls back to `/tmp/claude-code-mcp.log`. 162 | - Log rotation is not implemented yet (be careful with log file size). 163 | - Primarily tested with Claude CLI on Ubuntu/WSL2. 164 | 165 | ## License 166 | 167 | This project is licensed under the MIT License - see below for details. 168 | 169 | ``` 170 | MIT License 171 | 172 | Copyright (c) 2024 KunihiroS 173 | 174 | Permission is hereby granted, free of charge, to any person obtaining a copy 175 | of this software and associated documentation files (the "Software"), to deal 176 | in the Software without restriction, including without limitation the rights 177 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 178 | copies of the Software, and to permit persons to whom the Software is 179 | furnished to do so, subject to the following conditions: 180 | 181 | The above copyright notice and this permission notice shall be included in all 182 | copies or substantial portions of the Software. 183 | 184 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 185 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 186 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 187 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 188 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 189 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 190 | SOFTWARE. 191 | ``` 192 | 193 | ## Disclaimer 194 | 195 | This software is provided for educational and research purposes only. This project is not officially associated with or endorsed by Anthropic. Claude is a trademark of Anthropic. 196 | 197 | The project uses the Claude CLI as a dependency, but is an independent, community-driven effort. Users should ensure they comply with Anthropic's terms of service when using this project. 198 | 199 | The maintainers of this project are not responsible for any misuse of the software or violations of the terms of service of any third-party APIs or services. -------------------------------------------------------------------------------- /claude-code-server/.env.example: -------------------------------------------------------------------------------- 1 | CLAUDE_BIN= 2 | LOG_LEVEL=info 3 | -------------------------------------------------------------------------------- /claude-code-server/build/index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import { Server } from '@modelcontextprotocol/sdk/server/index.js'; 3 | import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; 4 | import { CallToolRequestSchema, ListToolsRequestSchema, McpError } from '@modelcontextprotocol/sdk/types.js'; 5 | import child_process from 'child_process'; 6 | import * as dotenv from 'dotenv'; 7 | import winston from 'winston'; 8 | import path from 'path'; 9 | import { fileURLToPath } from 'url'; 10 | import { dirname } from 'path'; 11 | import * as fs from 'fs'; 12 | import os from 'os'; // Import the os module 13 | const __filename = fileURLToPath(import.meta.url); 14 | const __dirname = dirname(__filename); 15 | // ロガーのフォーマット設定を共通化 16 | const createLoggerFormat = () => { 17 | return winston.format.combine(winston.format.timestamp(), winston.format.printf(({ timestamp, level, message }) => { 18 | return `[${timestamp}] [${level}] ${message}`; 19 | })); 20 | }; 21 | // 初期ロガーの設定(.envの読み込み前に最小限のロガーを設定) 22 | const initialLogger = winston.createLogger({ 23 | level: 'info', 24 | format: createLoggerFormat(), 25 | transports: [ 26 | new winston.transports.Console() 27 | ] 28 | }); 29 | // MCP Hostからの環境変数を優先し、.envファイルはフォールバックとして扱う 30 | if (!process.env.CLAUDE_BIN) { 31 | const envPaths = [ 32 | path.resolve(__dirname, '../.env'), 33 | path.resolve(__dirname, '../../.env'), 34 | path.resolve(process.cwd(), '.env'), 35 | path.resolve(process.cwd(), 'claude-code-server/.env'), 36 | path.resolve(os.homedir(), '.claude-code-mcp.env') // ホームディレクトリの .claude-code-mcp.env 37 | ]; 38 | for (const envPath of envPaths) { 39 | if (fs.existsSync(envPath)) { 40 | const result = dotenv.config({ path: envPath }); 41 | if (result.error) { 42 | initialLogger.error(`Failed to load .env file from ${envPath}: ${result.error.message}`); 43 | } 44 | else { 45 | initialLogger.info(`Successfully loaded .env file from ${envPath}`); 46 | initialLogger.debug(`Loaded environment variables: LOG_LEVEL=${process.env.LOG_LEVEL}, CLAUDE_BIN=${process.env.CLAUDE_BIN}`); 47 | break; 48 | } 49 | } 50 | else { 51 | initialLogger.debug(`CLAUDE_BIN fallback search: environment file at ${envPath} does not exist [MCP Host settings: not found]`); 52 | } 53 | } 54 | } 55 | // ログレベルの明示的な確認(デバッグ用) 56 | console.log(`Environment variable LOG_LEVEL: ${process.env.LOG_LEVEL}`); 57 | initialLogger.debug(`Current initial logger level: ${initialLogger.level}`); 58 | // ログファイルパスを決定するシンプルな方法 59 | let logFilePath = null; 60 | // 1. まずプロジェクトルートに書き込みを試みる 61 | try { 62 | const projectLogPath = path.resolve(__dirname, '../../claude-code-server.log'); 63 | initialLogger.debug(`Attempting to write to project root log: ${projectLogPath}`); 64 | fs.writeFileSync(projectLogPath, `# Log file initialization at ${new Date().toISOString()}\n`, { flag: 'a' }); 65 | logFilePath = projectLogPath; 66 | console.log(`Created log file in project root: ${logFilePath}`); 67 | initialLogger.debug(`Successfully created/accessed log file at: ${logFilePath}`); 68 | } 69 | catch (err) { 70 | console.error(`Error writing to project root: ${err instanceof Error ? err.message : String(err)}`); 71 | initialLogger.debug(`Failed to write to project root log with error: ${err instanceof Error ? err.stack : String(err)}`); 72 | // 2. 次にホームディレクトリに試みる 73 | try { 74 | const homeDir = process.env.HOME || process.env.USERPROFILE; 75 | if (homeDir) { 76 | const homeLogPath = path.resolve(homeDir, '.claude-code-server.log'); 77 | initialLogger.debug(`Attempting to write to home directory log: ${homeLogPath}`); 78 | fs.writeFileSync(homeLogPath, `# Log file initialization at ${new Date().toISOString()}\n`, { flag: 'a' }); 79 | console.log(`Created log file in home directory: ${homeLogPath}`); 80 | logFilePath = homeLogPath; 81 | initialLogger.debug(`Successfully created/accessed log file at: ${logFilePath}`); 82 | } 83 | } 84 | catch (err2) { 85 | console.error(`Error writing to home directory: ${err2 instanceof Error ? err2.message : String(err2)}`); 86 | initialLogger.debug(`Failed to write to home directory log with error: ${err2 instanceof Error ? err2.stack : String(err2)}`); 87 | // 3. 最後に/tmpに試す 88 | try { 89 | const tmpPath = '/tmp/claude-code-server.log'; 90 | initialLogger.debug(`Attempting to write to temp directory log: ${tmpPath}`); 91 | fs.writeFileSync(tmpPath, `# Log file initialization at ${new Date().toISOString()}\n`, { flag: 'a' }); 92 | logFilePath = tmpPath; 93 | console.log(`Created log file in temp directory: ${logFilePath}`); 94 | initialLogger.debug(`Successfully created/accessed log file at: ${logFilePath}`); 95 | } 96 | catch (err3) { 97 | console.error('All log file paths failed. Logs will be console-only.'); 98 | initialLogger.debug(`Failed to write to temp directory log with error: ${err3 instanceof Error ? err3.stack : String(err3)}`); 99 | logFilePath = null; 100 | } 101 | } 102 | } 103 | // 環境変数からログレベルを確実に取得 104 | const logLevel = process.env.LOG_LEVEL || 'info'; 105 | console.log(`Setting log level to: ${logLevel}`); 106 | initialLogger.debug(`Configured log level from environment: ${logLevel}`); 107 | // Winstonロガーの設定 108 | const logger = winston.createLogger({ 109 | // 環境変数からログレベルを設定 110 | level: logLevel, 111 | format: winston.format.combine(winston.format.timestamp(), winston.format.printf(({ timestamp, level, message }) => { 112 | return `[${timestamp}] [${level}] ${message}`; 113 | })), 114 | transports: [ 115 | // コンソールトランスポートもログレベル設定を継承 116 | new winston.transports.Console({ level: logLevel }) 117 | ] 118 | }); 119 | logger.debug('Winston logger created with console transport'); 120 | // ファイルトランスポートの追加 121 | if (logFilePath) { 122 | try { 123 | // ファイルトランスポートを作成 124 | const fileTransport = new winston.transports.File({ 125 | filename: logFilePath, 126 | // 明示的にログレベルを設定 127 | level: logLevel, 128 | options: { flags: 'a' } 129 | }); 130 | // ファイルトランスポート追加 131 | logger.add(fileTransport); 132 | console.log(`Added log file: ${logFilePath}`); 133 | logger.debug(`File transport added to logger with level: ${logLevel}`); 134 | // 同期書き込みテスト - シンプルな起動メッセージのみに置き換え 135 | fs.appendFileSync(logFilePath, `# System startup - ${new Date().toISOString()}\n`); 136 | logger.debug(`Wrote startup marker to log file`); 137 | } 138 | catch (err) { 139 | console.error('File transport setup error:', err); 140 | logger.debug(`Failed to setup file transport: ${err instanceof Error ? err.stack : String(err)}`); 141 | } 142 | } 143 | // 起動時にシンプルなログを書き込み 144 | logger.info('=== Claude Code Server started ==='); 145 | logger.debug('Server initialization sequence started'); 146 | // ファイル情報の診断 - デバッグモードでのみ詳細表示 147 | if (logFilePath && logLevel === 'debug') { 148 | try { 149 | const stats = fs.statSync(logFilePath); 150 | logger.debug(`Log file information (${logFilePath}): size=${stats.size} bytes, mode=${stats.mode.toString(8)}, uid=${stats.uid}, gid=${stats.gid}`); 151 | } 152 | catch (err) { 153 | logger.error('Failed to get file information:', err); 154 | } 155 | } 156 | // ログフラッシュ関数をシンプル化 157 | const flushLog = () => { 158 | logger.debug('Flushing logs to disk'); 159 | if (logFilePath) { 160 | try { 161 | // 同期的に書き込み 162 | fs.appendFileSync(logFilePath, `\n# Process terminated: ${new Date().toISOString()}\n`); 163 | logger.debug('Wrote termination marker to log file'); 164 | } 165 | catch (appendErr) { 166 | console.error('Error writing log on termination:', appendErr); 167 | logger.debug(`Failed to write termination marker: ${appendErr instanceof Error ? appendErr.stack : String(appendErr)}`); 168 | } 169 | } 170 | try { 171 | // Winstonのクローズを試みる(エラーを無視) 172 | logger.debug('Closing Winston logger'); 173 | logger.close(); 174 | } 175 | catch (err) { 176 | // 無視 177 | logger.debug(`Error while closing logger: ${err instanceof Error ? err.message : String(err)}`); 178 | } 179 | }; 180 | // プロセス終了時にログを確実にフラッシュ 181 | process.on('exit', () => { 182 | logger.debug('Process exit event detected'); 183 | flushLog(); 184 | }); 185 | // SIGINT (Ctrl+C) 処理 186 | process.on('SIGINT', () => { 187 | logger.info('Received SIGINT. Shutting down.'); 188 | logger.debug('SIGINT handler triggered'); 189 | flushLog(); 190 | process.exit(0); 191 | }); 192 | // 未処理の例外をキャッチ 193 | process.on('uncaughtException', (err) => { 194 | logger.error(`Uncaught exception: ${err.message}`); 195 | logger.error(err.stack); 196 | logger.debug('Uncaught exception handler triggered'); 197 | flushLog(); 198 | process.exit(1); 199 | }); 200 | // CLAUDE_BIN Validation 201 | let validatedClaudePath = null; 202 | const EXPECTED_EXECUTABLE_BASENAME = 'claude'; 203 | const IS_WINDOWS = process.platform === 'win32'; 204 | const claudeBinFromEnv = process.env.CLAUDE_BIN; 205 | if (!claudeBinFromEnv) { 206 | logger.error("CRITICAL: CLAUDE_BIN environment variable is not set. This is a required setting. Server exiting."); 207 | process.exit(1); 208 | } 209 | const resolvedPath = path.resolve(claudeBinFromEnv); 210 | const basename = path.basename(resolvedPath); 211 | let isValidBasename = false; 212 | if (IS_WINDOWS) { 213 | isValidBasename = (basename.toLowerCase() === EXPECTED_EXECUTABLE_BASENAME || basename.toLowerCase() === `${EXPECTED_EXECUTABLE_BASENAME}.exe`); 214 | } 215 | else { 216 | isValidBasename = (basename === EXPECTED_EXECUTABLE_BASENAME); 217 | } 218 | if (!isValidBasename) { 219 | logger.error(`CRITICAL: CLAUDE_BIN ("${claudeBinFromEnv}") resolved to "${resolvedPath}", which does not have the expected basename "${EXPECTED_EXECUTABLE_BASENAME}". Basename found: "${basename}". Server exiting.`); 220 | process.exit(1); 221 | } 222 | try { 223 | fs.accessSync(resolvedPath, fs.constants.X_OK); // Check for existence and execute permission 224 | validatedClaudePath = resolvedPath; // Set the validated path 225 | logger.info(`CLAUDE_BIN validated. Using executable: ${validatedClaudePath}`); 226 | // Now, perform the version check using the validated path 227 | try { 228 | logger.debug(`Checking Claude CLI version at path: ${validatedClaudePath}`); 229 | // Quote the path in case it contains spaces, for reliability with execSync 230 | const versionOutput = child_process.execSync(`"${validatedClaudePath}" --version`, { encoding: 'utf8' }); 231 | logger.info(`Claude CLI Version: ${versionOutput.trim()}`); 232 | } 233 | catch (err) { 234 | logger.warn(`Could not get Claude CLI version from validated path "${validatedClaudePath}". It might not be a valid Claude executable or is not working correctly. Error: ${err instanceof Error ? err.message : String(err)}`); 235 | logger.debug(`Failed to execute Claude CLI for version check: ${err instanceof Error ? err.stack : String(err)}`); 236 | // Original code continued even if version check failed, so this does too. 237 | // The main validation (name, existence, executability) has already passed. 238 | } 239 | } 240 | catch (err) { 241 | logger.error(`CRITICAL: CLAUDE_BIN ("${claudeBinFromEnv}") resolved to "${resolvedPath}", but it is not executable or does not exist. Error: ${err instanceof Error ? err.message : String(err)}. Server exiting.`); 242 | process.exit(1); 243 | } 244 | // Base64 エンコード/デコード ヘルパー関数 245 | function encodeText(text) { 246 | return Buffer.from(text, 'utf8').toString('base64'); 247 | } 248 | function decodeText(encoded) { 249 | return Buffer.from(encoded, 'base64').toString('utf8'); 250 | } 251 | class ClaudeCodeServer { 252 | constructor() { 253 | logger.debug('Initializing Claude Code Server'); 254 | this.server = new Server({ 255 | name: 'claude-code-server', 256 | version: '0.1.0', 257 | }, { 258 | capabilities: { 259 | resources: {}, 260 | tools: {}, 261 | }, 262 | }); 263 | logger.debug('Setting up tool handlers'); 264 | this.setupToolHandlers(); 265 | this.server.onerror = (error) => { 266 | logger.error('[MCP Error]', error); 267 | logger.debug(`MCP server error details: ${error instanceof Error ? error.stack : JSON.stringify(error)}`); 268 | }; 269 | process.on('SIGINT', async () => { 270 | logger.debug('SIGINT received in server handler'); 271 | await this.server.close(); 272 | process.exit(0); 273 | }); 274 | logger.debug('Claude Code Server initialization completed'); 275 | } 276 | setupToolHandlers() { 277 | // ツールリストの設定 278 | logger.debug('Registering ListTools request handler'); 279 | this.server.setRequestHandler(ListToolsRequestSchema, async () => { 280 | logger.debug('ListTools handler called'); 281 | return { 282 | tools: [ 283 | { 284 | name: 'explain_code', 285 | description: 'Provides detailed explanation of the given code.', 286 | inputSchema: { 287 | type: 'object', 288 | properties: { 289 | code: { type: 'string', description: 'Target code' }, 290 | context: { type: 'string', description: 'Additional context', default: '' } 291 | }, 292 | required: ['code'] 293 | } 294 | }, 295 | { 296 | name: 'review_code', 297 | description: 'Reviews the given code.', 298 | inputSchema: { 299 | type: 'object', 300 | properties: { 301 | code: { type: 'string', description: 'Code to review' }, 302 | focus_areas: { type: 'string', description: 'Areas to focus on', default: '' } 303 | }, 304 | required: ['code'] 305 | } 306 | }, 307 | { 308 | name: 'fix_code', 309 | description: 'Fixes bugs or issues in the given code.', 310 | inputSchema: { 311 | type: 'object', 312 | properties: { 313 | code: { type: 'string', description: 'Code to fix' }, 314 | issue_description: { type: 'string', description: 'Description of the issue' } 315 | }, 316 | required: ['code', 'issue_description'] 317 | } 318 | }, 319 | { 320 | name: 'edit_code', 321 | description: 'Edits the given code based on instructions.', 322 | inputSchema: { 323 | type: 'object', 324 | properties: { 325 | code: { type: 'string', description: 'Code to edit' }, 326 | instructions: { type: 'string', description: 'Editing instructions' } 327 | }, 328 | required: ['code', 'instructions'] 329 | } 330 | }, 331 | { 332 | name: 'test_code', 333 | description: 'Generates tests for the given code.', 334 | inputSchema: { 335 | type: 'object', 336 | properties: { 337 | code: { type: 'string', description: 'Code to test' }, 338 | test_framework: { type: 'string', description: 'Test framework to use', default: '' } 339 | }, 340 | required: ['code'] 341 | } 342 | }, 343 | { 344 | name: 'simulate_command', 345 | description: 'Simulates the execution of a given command.', 346 | inputSchema: { 347 | type: 'object', 348 | properties: { 349 | command: { type: 'string', description: 'Command to execute' }, 350 | input: { type: 'string', description: 'Input data', default: '' } 351 | }, 352 | required: ['command'] 353 | } 354 | }, 355 | { 356 | name: 'your_own_query', 357 | description: 'Sends a custom query with context.', 358 | inputSchema: { 359 | type: 'object', 360 | properties: { 361 | query: { type: 'string', description: 'Query text' }, 362 | context: { type: 'string', description: 'Additional context', default: '' } 363 | }, 364 | required: ['query'] 365 | } 366 | } 367 | ] 368 | }; 369 | }); 370 | // ツール実行リクエスト処理 371 | logger.debug('Registering CallTool request handler'); 372 | this.server.setRequestHandler(CallToolRequestSchema, async (request) => { 373 | const { name, arguments: args } = request.params; 374 | logger.debug(`CallTool handler called for tool: ${name} with args: ${JSON.stringify(args, null, 2)}`); 375 | const runClaudeCommand = (claudeArgs, stdinInput) => { 376 | return new Promise((resolve, reject) => { 377 | // タイムアウト設定 (5分) 378 | const timeoutMs = 5 * 60 * 1000; 379 | let timeoutId; 380 | try { 381 | // より詳細なデバッグ情報 382 | logger.debug(`Executing Claude CLI at path: ${validatedClaudePath}`); 383 | logger.debug(`Claude CLI arguments: ${JSON.stringify(claudeArgs)}`); 384 | if (stdinInput) 385 | logger.debug(`Input length: ${stdinInput.length} characters`); 386 | // 環境変数をログに出力 387 | logger.debug(`Environment PATH: ${process.env.PATH}`); 388 | if (validatedClaudePath === null) { 389 | logger.error('validatedClaudePath is null. Claude CLI cannot be executed.'); 390 | // エラーをクライアントに返すなど、より丁寧なエラー処理を検討してください。 391 | throw new Error('Validated Claude CLI path is not available. Please check CLAUDE_BIN environment variable or server configuration.'); 392 | } 393 | const proc = child_process.spawn(validatedClaudePath, claudeArgs, { 394 | env: { ...process.env }, 395 | stdio: ['pipe', 'pipe', 'pipe'] 396 | }); 397 | // 標準入力がある場合は書き込みと終了 398 | if (stdinInput) { 399 | proc.stdin.write(stdinInput); 400 | proc.stdin.end(); 401 | logger.debug('Wrote input to Claude CLI stdin'); 402 | } 403 | let stdout = ''; 404 | let stderr = ''; 405 | proc.stdout.on('data', (data) => { 406 | const chunk = data.toString(); 407 | stdout += chunk; 408 | logger.debug(`Received stdout chunk: ${chunk.length} bytes`); 409 | }); 410 | proc.stderr.on('data', (data) => { 411 | const chunk = data.toString(); 412 | stderr += chunk; 413 | logger.error(`Claude stderr: ${chunk}`); 414 | logger.debug(`Claude stderr output: ${chunk}`); 415 | }); 416 | // タイムアウト設定 417 | timeoutId = setTimeout(() => { 418 | logger.error(`Command timed out after ${timeoutMs / 1000} seconds`); 419 | logger.debug('Killing process due to timeout'); 420 | proc.kill(); 421 | reject(new Error(`Command timed out after ${timeoutMs / 1000} seconds`)); 422 | }, timeoutMs); 423 | proc.on('close', (code) => { 424 | clearTimeout(timeoutId); 425 | logger.debug(`Claude process closed with code: ${code}`); 426 | if (code === 0) { 427 | logger.debug(`Claude command completed successfully, output length: ${stdout.length} bytes`); 428 | resolve(stdout.trim()); 429 | } 430 | else { 431 | logger.error(`Command failed with code ${code}`); 432 | logger.debug(`stderr: ${stderr}`); 433 | reject(new Error(`Command failed with code ${code}: ${stderr}`)); 434 | } 435 | }); 436 | proc.on('error', (err) => { 437 | clearTimeout(timeoutId); 438 | logger.error("Process spawn error:", err); 439 | logger.debug(`Process error details: ${err.stack}`); 440 | reject(err); 441 | }); 442 | } 443 | catch (err) { 444 | logger.error("Failed to spawn process:", err); 445 | logger.debug(`Spawn failure details: ${err instanceof Error ? err.stack : String(err)}`); 446 | reject(err); 447 | } 448 | }); 449 | }; 450 | try { 451 | // 文字列の最大長さを制限する関数 452 | const truncateIfNeeded = (str, maxLength = 10000) => { 453 | if (str.length > maxLength) { 454 | logger.warn(`Warning: Input too long, truncating (${str.length} -> ${maxLength})`); 455 | return str.substring(0, maxLength) + "... [truncated]"; 456 | } 457 | return str; 458 | }; 459 | // エラーを適切に処理するために各ケースを try-catch で囲む 460 | switch (name) { 461 | case 'explain_code': { 462 | const { code, context } = args; 463 | try { 464 | logger.debug(`Processing explain_code request, code length: ${code.length}`); 465 | const encodedCode = encodeText(truncateIfNeeded(code)); 466 | logger.debug(`Code encoded to base64, length: ${encodedCode.length}`); 467 | // ファイルを使用して大きな入力を渡す場合の代替方法 468 | const prompt = `You are super professional engineer. Please kindly provide a detailed explanation of the following Base64 encoded code:\n\n${encodedCode}\n\nAdditional context (if provided):\n${context || 'No additional context provided.'}`; 469 | logger.debug('Calling Claude CLI with prompt'); 470 | const output = await runClaudeCommand(['--print'], prompt); 471 | logger.debug(`Received response from Claude, length: ${output.length}`); 472 | return { content: [{ type: 'text', text: output }] }; 473 | } 474 | catch (err) { 475 | logger.error("Error in explain_code:", err); 476 | logger.debug(`explain_code error details: ${err instanceof Error ? err.stack : String(err)}`); 477 | throw err; 478 | } 479 | } 480 | case 'review_code': { 481 | const { code, focus_areas } = args; 482 | try { 483 | logger.debug(`Processing review_code request, code length: ${code.length}`); 484 | const encodedCode = encodeText(truncateIfNeeded(code)); 485 | logger.debug(`Code encoded to base64, length: ${encodedCode.length}`); 486 | const prompt = `You are super professional engineer. Please review the following Base64 encoded code. Consider code readability, efficiency, potential bugs, and security vulnerabilities.\n\nCode:\n${encodedCode}\n\nFocus areas (if provided):\n${focus_areas || 'No specific focus areas provided.'}`; 487 | logger.debug('Calling Claude CLI with prompt'); 488 | const output = await runClaudeCommand(['--print'], prompt); 489 | logger.debug(`Received response from Claude, length: ${output.length}`); 490 | return { content: [{ type: 'text', text: output }] }; 491 | } 492 | catch (err) { 493 | logger.error("Error in review_code:", err); 494 | logger.debug(`review_code error details: ${err instanceof Error ? err.stack : String(err)}`); 495 | throw err; 496 | } 497 | } 498 | case 'fix_code': { 499 | const { code, issue_description } = args; 500 | logger.debug(`Processing fix_code request, code length: ${code.length}`); 501 | const encodedCode = encodeText(truncateIfNeeded(code)); 502 | logger.debug(`Code encoded to base64, length: ${encodedCode.length}`); 503 | const prompt = `You are super professional engineer. Please fix the following Base64 encoded code, addressing the issue described below:\n\nCode:\n${encodedCode}\n\nIssue description:\n${issue_description ?? 'No specific issue described.'}`; 504 | logger.debug('Calling Claude CLI with prompt'); 505 | const output = await runClaudeCommand(['--print'], prompt); 506 | logger.debug(`Received response from Claude, length: ${output.length}`); 507 | return { content: [{ type: 'text', text: output }] }; 508 | } 509 | case 'edit_code': { 510 | const { code, instructions } = args; 511 | logger.debug(`Processing edit_code request, code length: ${code.length}`); 512 | const encodedCode = encodeText(truncateIfNeeded(code)); 513 | logger.debug(`Code encoded to base64, length: ${encodedCode.length}`); 514 | const prompt = `You are super professional engineer. Please edit the following Base64 encoded code according to the instructions provided:\n\nCode:\n${encodedCode}\n\nInstructions:\n${instructions ?? 'No specific instructions provided.'}`; 515 | logger.debug('Calling Claude CLI with prompt'); 516 | const output = await runClaudeCommand(['--print'], prompt); 517 | logger.debug(`Received response from Claude, length: ${output.length}`); 518 | return { content: [{ type: 'text', text: output }] }; 519 | } 520 | case 'test_code': { 521 | const { code, test_framework } = args; 522 | logger.debug(`Processing test_code request, code length: ${code.length}`); 523 | const encodedCode = encodeText(truncateIfNeeded(code)); 524 | logger.debug(`Code encoded to base64, length: ${encodedCode.length}`); 525 | const framework = test_framework || 'default'; 526 | const prompt = `You are super professional engineer. Please generate tests for the following Base64 encoded code.\n\nCode:\n${encodedCode}\n\nTest framework (if specified):\n${framework || 'No specific framework provided. Please use a suitable default framework.'}`; 527 | logger.debug('Calling Claude CLI with prompt'); 528 | const output = await runClaudeCommand(['--print'], prompt); 529 | logger.debug(`Received response from Claude, length: ${output.length}`); 530 | return { content: [{ type: 'text', text: output }] }; 531 | } 532 | case 'simulate_command': { 533 | const { command, input } = args; 534 | logger.debug(`Processing simulate_command request, command: ${command}`); 535 | const prompt = `You are super professional engineer. Simulate the execution of the following command:\n\nCommand: ${command}\n\nInput: ${input || 'No input provided.'}\n\nDescribe the expected behavior and output, without actually executing the command.`; 536 | logger.debug('Calling Claude CLI with prompt'); 537 | const output = await runClaudeCommand(['--print'], prompt); 538 | logger.debug(`Received response from Claude, length: ${output.length}`); 539 | return { content: [{ type: 'text', text: output }] }; 540 | } 541 | case 'your_own_query': { 542 | const { query, context } = args; 543 | logger.debug(`Processing your_own_query request, query length: ${query.length}`); 544 | const prompt = `Query: ${query} ${context || ''}`; 545 | logger.debug('Calling Claude CLI with prompt'); 546 | const output = await runClaudeCommand(['--print'], prompt); 547 | logger.debug(`Received response from Claude, length: ${output.length}`); 548 | return { content: [{ type: 'text', text: output }] }; 549 | } 550 | default: 551 | throw new McpError(404, "Unknown tool: " + name); 552 | } 553 | } 554 | catch (err) { 555 | logger.error("Error executing tool:", err); 556 | logger.debug(`Tool execution error details: ${err instanceof Error ? err.stack : String(err)}`); 557 | throw new McpError(500, err instanceof Error ? err.message : String(err)); 558 | } 559 | }); 560 | } 561 | async run() { 562 | logger.debug('Starting Claude Code MCP server'); 563 | const transport = new StdioServerTransport(); 564 | logger.debug('Created StdioServerTransport'); 565 | await this.server.connect(transport); 566 | logger.info("Claude Code MCP server running on stdio"); 567 | logger.debug('Server connected to transport and ready to process requests'); 568 | } 569 | } 570 | const server = new ClaudeCodeServer(); 571 | server.run().catch((err) => { 572 | logger.error('Failed to start server:', err); 573 | logger.debug(`Server start failure details: ${err instanceof Error ? err.stack : String(err)}`); 574 | console.error(err); 575 | }); 576 | -------------------------------------------------------------------------------- /claude-code-server/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "claude-code-server", 3 | "version": "0.1.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "claude-code-server", 9 | "version": "0.1.0", 10 | "dependencies": { 11 | "@modelcontextprotocol/sdk": "^1.0.0", 12 | "dotenv": "^16.4.5" 13 | }, 14 | "devDependencies": { 15 | "@types/dotenv": "^8.2.0", 16 | "@types/node": "^20.11.24", 17 | "@types/winston": "^2.4.4", 18 | "typescript": "^4.9.5" 19 | } 20 | }, 21 | "node_modules/@colors/colors": { 22 | "version": "1.6.0", 23 | "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", 24 | "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", 25 | "dev": true, 26 | "license": "MIT", 27 | "engines": { 28 | "node": ">=0.1.90" 29 | } 30 | }, 31 | "node_modules/@dabh/diagnostics": { 32 | "version": "2.0.3", 33 | "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", 34 | "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", 35 | "dev": true, 36 | "license": "MIT", 37 | "dependencies": { 38 | "colorspace": "1.1.x", 39 | "enabled": "2.0.x", 40 | "kuler": "^2.0.0" 41 | } 42 | }, 43 | "node_modules/@modelcontextprotocol/sdk": { 44 | "version": "1.6.1", 45 | "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.6.1.tgz", 46 | "integrity": "sha512-oxzMzYCkZHMntzuyerehK3fV6A2Kwh5BD6CGEJSVDU2QNEhfLOptf2X7esQgaHZXHZY0oHmMsOtIDLP71UJXgA==", 47 | "license": "MIT", 48 | "dependencies": { 49 | "content-type": "^1.0.5", 50 | "cors": "^2.8.5", 51 | "eventsource": "^3.0.2", 52 | "express": "^5.0.1", 53 | "express-rate-limit": "^7.5.0", 54 | "pkce-challenge": "^4.1.0", 55 | "raw-body": "^3.0.0", 56 | "zod": "^3.23.8", 57 | "zod-to-json-schema": "^3.24.1" 58 | }, 59 | "engines": { 60 | "node": ">=18" 61 | } 62 | }, 63 | "node_modules/@types/dotenv": { 64 | "version": "8.2.3", 65 | "resolved": "https://registry.npmjs.org/@types/dotenv/-/dotenv-8.2.3.tgz", 66 | "integrity": "sha512-g2FXjlDX/cYuc5CiQvyU/6kkbP1JtmGzh0obW50zD7OKeILVL0NSpPWLXVfqoAGQjom2/SLLx9zHq0KXvD6mbw==", 67 | "deprecated": "This is a stub types definition. dotenv provides its own type definitions, so you do not need this installed.", 68 | "dev": true, 69 | "license": "MIT", 70 | "dependencies": { 71 | "dotenv": "*" 72 | } 73 | }, 74 | "node_modules/@types/node": { 75 | "version": "20.17.24", 76 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.24.tgz", 77 | "integrity": "sha512-d7fGCyB96w9BnWQrOsJtpyiSaBcAYYr75bnK6ZRjDbql2cGLj/3GsL5OYmLPNq76l7Gf2q4Rv9J2o6h5CrD9sA==", 78 | "dev": true, 79 | "license": "MIT", 80 | "dependencies": { 81 | "undici-types": "~6.19.2" 82 | } 83 | }, 84 | "node_modules/@types/triple-beam": { 85 | "version": "1.3.5", 86 | "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", 87 | "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", 88 | "dev": true, 89 | "license": "MIT" 90 | }, 91 | "node_modules/@types/winston": { 92 | "version": "2.4.4", 93 | "resolved": "https://registry.npmjs.org/@types/winston/-/winston-2.4.4.tgz", 94 | "integrity": "sha512-BVGCztsypW8EYwJ+Hq+QNYiT/MUyCif0ouBH+flrY66O5W+KIXAMML6E/0fJpm7VjIzgangahl5S03bJJQGrZw==", 95 | "deprecated": "This is a stub types definition. winston provides its own type definitions, so you do not need this installed.", 96 | "dev": true, 97 | "license": "MIT", 98 | "dependencies": { 99 | "winston": "*" 100 | } 101 | }, 102 | "node_modules/accepts": { 103 | "version": "2.0.0", 104 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", 105 | "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", 106 | "license": "MIT", 107 | "dependencies": { 108 | "mime-types": "^3.0.0", 109 | "negotiator": "^1.0.0" 110 | }, 111 | "engines": { 112 | "node": ">= 0.6" 113 | } 114 | }, 115 | "node_modules/async": { 116 | "version": "3.2.6", 117 | "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", 118 | "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", 119 | "dev": true, 120 | "license": "MIT" 121 | }, 122 | "node_modules/body-parser": { 123 | "version": "2.1.0", 124 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.1.0.tgz", 125 | "integrity": "sha512-/hPxh61E+ll0Ujp24Ilm64cykicul1ypfwjVttduAiEdtnJFvLePSrIPk+HMImtNv5270wOGCb1Tns2rybMkoQ==", 126 | "license": "MIT", 127 | "dependencies": { 128 | "bytes": "^3.1.2", 129 | "content-type": "^1.0.5", 130 | "debug": "^4.4.0", 131 | "http-errors": "^2.0.0", 132 | "iconv-lite": "^0.5.2", 133 | "on-finished": "^2.4.1", 134 | "qs": "^6.14.0", 135 | "raw-body": "^3.0.0", 136 | "type-is": "^2.0.0" 137 | }, 138 | "engines": { 139 | "node": ">=18" 140 | } 141 | }, 142 | "node_modules/body-parser/node_modules/debug": { 143 | "version": "4.4.0", 144 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", 145 | "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", 146 | "license": "MIT", 147 | "dependencies": { 148 | "ms": "^2.1.3" 149 | }, 150 | "engines": { 151 | "node": ">=6.0" 152 | }, 153 | "peerDependenciesMeta": { 154 | "supports-color": { 155 | "optional": true 156 | } 157 | } 158 | }, 159 | "node_modules/body-parser/node_modules/ms": { 160 | "version": "2.1.3", 161 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 162 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 163 | "license": "MIT" 164 | }, 165 | "node_modules/body-parser/node_modules/qs": { 166 | "version": "6.14.0", 167 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", 168 | "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", 169 | "license": "BSD-3-Clause", 170 | "dependencies": { 171 | "side-channel": "^1.1.0" 172 | }, 173 | "engines": { 174 | "node": ">=0.6" 175 | }, 176 | "funding": { 177 | "url": "https://github.com/sponsors/ljharb" 178 | } 179 | }, 180 | "node_modules/bytes": { 181 | "version": "3.1.2", 182 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 183 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 184 | "license": "MIT", 185 | "engines": { 186 | "node": ">= 0.8" 187 | } 188 | }, 189 | "node_modules/call-bind-apply-helpers": { 190 | "version": "1.0.2", 191 | "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", 192 | "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", 193 | "license": "MIT", 194 | "dependencies": { 195 | "es-errors": "^1.3.0", 196 | "function-bind": "^1.1.2" 197 | }, 198 | "engines": { 199 | "node": ">= 0.4" 200 | } 201 | }, 202 | "node_modules/call-bound": { 203 | "version": "1.0.4", 204 | "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", 205 | "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", 206 | "license": "MIT", 207 | "dependencies": { 208 | "call-bind-apply-helpers": "^1.0.2", 209 | "get-intrinsic": "^1.3.0" 210 | }, 211 | "engines": { 212 | "node": ">= 0.4" 213 | }, 214 | "funding": { 215 | "url": "https://github.com/sponsors/ljharb" 216 | } 217 | }, 218 | "node_modules/color": { 219 | "version": "3.2.1", 220 | "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", 221 | "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", 222 | "dev": true, 223 | "license": "MIT", 224 | "dependencies": { 225 | "color-convert": "^1.9.3", 226 | "color-string": "^1.6.0" 227 | } 228 | }, 229 | "node_modules/color-convert": { 230 | "version": "1.9.3", 231 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 232 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 233 | "dev": true, 234 | "license": "MIT", 235 | "dependencies": { 236 | "color-name": "1.1.3" 237 | } 238 | }, 239 | "node_modules/color-name": { 240 | "version": "1.1.3", 241 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 242 | "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", 243 | "dev": true, 244 | "license": "MIT" 245 | }, 246 | "node_modules/color-string": { 247 | "version": "1.9.1", 248 | "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", 249 | "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", 250 | "dev": true, 251 | "license": "MIT", 252 | "dependencies": { 253 | "color-name": "^1.0.0", 254 | "simple-swizzle": "^0.2.2" 255 | } 256 | }, 257 | "node_modules/colorspace": { 258 | "version": "1.1.4", 259 | "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", 260 | "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", 261 | "dev": true, 262 | "license": "MIT", 263 | "dependencies": { 264 | "color": "^3.1.3", 265 | "text-hex": "1.0.x" 266 | } 267 | }, 268 | "node_modules/content-disposition": { 269 | "version": "1.0.0", 270 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", 271 | "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", 272 | "license": "MIT", 273 | "dependencies": { 274 | "safe-buffer": "5.2.1" 275 | }, 276 | "engines": { 277 | "node": ">= 0.6" 278 | } 279 | }, 280 | "node_modules/content-type": { 281 | "version": "1.0.5", 282 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 283 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 284 | "license": "MIT", 285 | "engines": { 286 | "node": ">= 0.6" 287 | } 288 | }, 289 | "node_modules/cookie": { 290 | "version": "0.7.1", 291 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", 292 | "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", 293 | "license": "MIT", 294 | "engines": { 295 | "node": ">= 0.6" 296 | } 297 | }, 298 | "node_modules/cookie-signature": { 299 | "version": "1.2.2", 300 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", 301 | "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", 302 | "license": "MIT", 303 | "engines": { 304 | "node": ">=6.6.0" 305 | } 306 | }, 307 | "node_modules/cors": { 308 | "version": "2.8.5", 309 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 310 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 311 | "license": "MIT", 312 | "dependencies": { 313 | "object-assign": "^4", 314 | "vary": "^1" 315 | }, 316 | "engines": { 317 | "node": ">= 0.10" 318 | } 319 | }, 320 | "node_modules/debug": { 321 | "version": "4.3.6", 322 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", 323 | "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", 324 | "license": "MIT", 325 | "dependencies": { 326 | "ms": "2.1.2" 327 | }, 328 | "engines": { 329 | "node": ">=6.0" 330 | }, 331 | "peerDependenciesMeta": { 332 | "supports-color": { 333 | "optional": true 334 | } 335 | } 336 | }, 337 | "node_modules/depd": { 338 | "version": "2.0.0", 339 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 340 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 341 | "license": "MIT", 342 | "engines": { 343 | "node": ">= 0.8" 344 | } 345 | }, 346 | "node_modules/destroy": { 347 | "version": "1.2.0", 348 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 349 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 350 | "license": "MIT", 351 | "engines": { 352 | "node": ">= 0.8", 353 | "npm": "1.2.8000 || >= 1.4.16" 354 | } 355 | }, 356 | "node_modules/dotenv": { 357 | "version": "16.4.7", 358 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", 359 | "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", 360 | "license": "BSD-2-Clause", 361 | "engines": { 362 | "node": ">=12" 363 | }, 364 | "funding": { 365 | "url": "https://dotenvx.com" 366 | } 367 | }, 368 | "node_modules/dunder-proto": { 369 | "version": "1.0.1", 370 | "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", 371 | "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", 372 | "license": "MIT", 373 | "dependencies": { 374 | "call-bind-apply-helpers": "^1.0.1", 375 | "es-errors": "^1.3.0", 376 | "gopd": "^1.2.0" 377 | }, 378 | "engines": { 379 | "node": ">= 0.4" 380 | } 381 | }, 382 | "node_modules/ee-first": { 383 | "version": "1.1.1", 384 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 385 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", 386 | "license": "MIT" 387 | }, 388 | "node_modules/enabled": { 389 | "version": "2.0.0", 390 | "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", 391 | "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", 392 | "dev": true, 393 | "license": "MIT" 394 | }, 395 | "node_modules/encodeurl": { 396 | "version": "2.0.0", 397 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", 398 | "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", 399 | "license": "MIT", 400 | "engines": { 401 | "node": ">= 0.8" 402 | } 403 | }, 404 | "node_modules/es-define-property": { 405 | "version": "1.0.1", 406 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", 407 | "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", 408 | "license": "MIT", 409 | "engines": { 410 | "node": ">= 0.4" 411 | } 412 | }, 413 | "node_modules/es-errors": { 414 | "version": "1.3.0", 415 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 416 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 417 | "license": "MIT", 418 | "engines": { 419 | "node": ">= 0.4" 420 | } 421 | }, 422 | "node_modules/es-object-atoms": { 423 | "version": "1.1.1", 424 | "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", 425 | "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", 426 | "license": "MIT", 427 | "dependencies": { 428 | "es-errors": "^1.3.0" 429 | }, 430 | "engines": { 431 | "node": ">= 0.4" 432 | } 433 | }, 434 | "node_modules/escape-html": { 435 | "version": "1.0.3", 436 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 437 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", 438 | "license": "MIT" 439 | }, 440 | "node_modules/etag": { 441 | "version": "1.8.1", 442 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 443 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 444 | "license": "MIT", 445 | "engines": { 446 | "node": ">= 0.6" 447 | } 448 | }, 449 | "node_modules/eventsource": { 450 | "version": "3.0.5", 451 | "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.5.tgz", 452 | "integrity": "sha512-LT/5J605bx5SNyE+ITBDiM3FxffBiq9un7Vx0EwMDM3vg8sWKx/tO2zC+LMqZ+smAM0F2hblaDZUVZF0te2pSw==", 453 | "license": "MIT", 454 | "dependencies": { 455 | "eventsource-parser": "^3.0.0" 456 | }, 457 | "engines": { 458 | "node": ">=18.0.0" 459 | } 460 | }, 461 | "node_modules/eventsource-parser": { 462 | "version": "3.0.0", 463 | "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.0.tgz", 464 | "integrity": "sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==", 465 | "license": "MIT", 466 | "engines": { 467 | "node": ">=18.0.0" 468 | } 469 | }, 470 | "node_modules/express": { 471 | "version": "5.0.1", 472 | "resolved": "https://registry.npmjs.org/express/-/express-5.0.1.tgz", 473 | "integrity": "sha512-ORF7g6qGnD+YtUG9yx4DFoqCShNMmUKiXuT5oWMHiOvt/4WFbHC6yCwQMTSBMno7AqntNCAzzcnnjowRkTL9eQ==", 474 | "license": "MIT", 475 | "dependencies": { 476 | "accepts": "^2.0.0", 477 | "body-parser": "^2.0.1", 478 | "content-disposition": "^1.0.0", 479 | "content-type": "~1.0.4", 480 | "cookie": "0.7.1", 481 | "cookie-signature": "^1.2.1", 482 | "debug": "4.3.6", 483 | "depd": "2.0.0", 484 | "encodeurl": "~2.0.0", 485 | "escape-html": "~1.0.3", 486 | "etag": "~1.8.1", 487 | "finalhandler": "^2.0.0", 488 | "fresh": "2.0.0", 489 | "http-errors": "2.0.0", 490 | "merge-descriptors": "^2.0.0", 491 | "methods": "~1.1.2", 492 | "mime-types": "^3.0.0", 493 | "on-finished": "2.4.1", 494 | "once": "1.4.0", 495 | "parseurl": "~1.3.3", 496 | "proxy-addr": "~2.0.7", 497 | "qs": "6.13.0", 498 | "range-parser": "~1.2.1", 499 | "router": "^2.0.0", 500 | "safe-buffer": "5.2.1", 501 | "send": "^1.1.0", 502 | "serve-static": "^2.1.0", 503 | "setprototypeof": "1.2.0", 504 | "statuses": "2.0.1", 505 | "type-is": "^2.0.0", 506 | "utils-merge": "1.0.1", 507 | "vary": "~1.1.2" 508 | }, 509 | "engines": { 510 | "node": ">= 18" 511 | } 512 | }, 513 | "node_modules/express-rate-limit": { 514 | "version": "7.5.0", 515 | "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz", 516 | "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==", 517 | "license": "MIT", 518 | "engines": { 519 | "node": ">= 16" 520 | }, 521 | "funding": { 522 | "url": "https://github.com/sponsors/express-rate-limit" 523 | }, 524 | "peerDependencies": { 525 | "express": "^4.11 || 5 || ^5.0.0-beta.1" 526 | } 527 | }, 528 | "node_modules/fecha": { 529 | "version": "4.2.3", 530 | "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", 531 | "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==", 532 | "dev": true, 533 | "license": "MIT" 534 | }, 535 | "node_modules/finalhandler": { 536 | "version": "2.1.0", 537 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", 538 | "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", 539 | "license": "MIT", 540 | "dependencies": { 541 | "debug": "^4.4.0", 542 | "encodeurl": "^2.0.0", 543 | "escape-html": "^1.0.3", 544 | "on-finished": "^2.4.1", 545 | "parseurl": "^1.3.3", 546 | "statuses": "^2.0.1" 547 | }, 548 | "engines": { 549 | "node": ">= 0.8" 550 | } 551 | }, 552 | "node_modules/finalhandler/node_modules/debug": { 553 | "version": "4.4.0", 554 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", 555 | "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", 556 | "license": "MIT", 557 | "dependencies": { 558 | "ms": "^2.1.3" 559 | }, 560 | "engines": { 561 | "node": ">=6.0" 562 | }, 563 | "peerDependenciesMeta": { 564 | "supports-color": { 565 | "optional": true 566 | } 567 | } 568 | }, 569 | "node_modules/finalhandler/node_modules/ms": { 570 | "version": "2.1.3", 571 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 572 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 573 | "license": "MIT" 574 | }, 575 | "node_modules/fn.name": { 576 | "version": "1.1.0", 577 | "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", 578 | "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", 579 | "dev": true, 580 | "license": "MIT" 581 | }, 582 | "node_modules/forwarded": { 583 | "version": "0.2.0", 584 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 585 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 586 | "license": "MIT", 587 | "engines": { 588 | "node": ">= 0.6" 589 | } 590 | }, 591 | "node_modules/fresh": { 592 | "version": "2.0.0", 593 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", 594 | "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", 595 | "license": "MIT", 596 | "engines": { 597 | "node": ">= 0.8" 598 | } 599 | }, 600 | "node_modules/function-bind": { 601 | "version": "1.1.2", 602 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 603 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 604 | "license": "MIT", 605 | "funding": { 606 | "url": "https://github.com/sponsors/ljharb" 607 | } 608 | }, 609 | "node_modules/get-intrinsic": { 610 | "version": "1.3.0", 611 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", 612 | "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", 613 | "license": "MIT", 614 | "dependencies": { 615 | "call-bind-apply-helpers": "^1.0.2", 616 | "es-define-property": "^1.0.1", 617 | "es-errors": "^1.3.0", 618 | "es-object-atoms": "^1.1.1", 619 | "function-bind": "^1.1.2", 620 | "get-proto": "^1.0.1", 621 | "gopd": "^1.2.0", 622 | "has-symbols": "^1.1.0", 623 | "hasown": "^2.0.2", 624 | "math-intrinsics": "^1.1.0" 625 | }, 626 | "engines": { 627 | "node": ">= 0.4" 628 | }, 629 | "funding": { 630 | "url": "https://github.com/sponsors/ljharb" 631 | } 632 | }, 633 | "node_modules/get-proto": { 634 | "version": "1.0.1", 635 | "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", 636 | "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", 637 | "license": "MIT", 638 | "dependencies": { 639 | "dunder-proto": "^1.0.1", 640 | "es-object-atoms": "^1.0.0" 641 | }, 642 | "engines": { 643 | "node": ">= 0.4" 644 | } 645 | }, 646 | "node_modules/gopd": { 647 | "version": "1.2.0", 648 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", 649 | "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", 650 | "license": "MIT", 651 | "engines": { 652 | "node": ">= 0.4" 653 | }, 654 | "funding": { 655 | "url": "https://github.com/sponsors/ljharb" 656 | } 657 | }, 658 | "node_modules/has-symbols": { 659 | "version": "1.1.0", 660 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", 661 | "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", 662 | "license": "MIT", 663 | "engines": { 664 | "node": ">= 0.4" 665 | }, 666 | "funding": { 667 | "url": "https://github.com/sponsors/ljharb" 668 | } 669 | }, 670 | "node_modules/hasown": { 671 | "version": "2.0.2", 672 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 673 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 674 | "license": "MIT", 675 | "dependencies": { 676 | "function-bind": "^1.1.2" 677 | }, 678 | "engines": { 679 | "node": ">= 0.4" 680 | } 681 | }, 682 | "node_modules/http-errors": { 683 | "version": "2.0.0", 684 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 685 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 686 | "license": "MIT", 687 | "dependencies": { 688 | "depd": "2.0.0", 689 | "inherits": "2.0.4", 690 | "setprototypeof": "1.2.0", 691 | "statuses": "2.0.1", 692 | "toidentifier": "1.0.1" 693 | }, 694 | "engines": { 695 | "node": ">= 0.8" 696 | } 697 | }, 698 | "node_modules/iconv-lite": { 699 | "version": "0.5.2", 700 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.2.tgz", 701 | "integrity": "sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==", 702 | "license": "MIT", 703 | "dependencies": { 704 | "safer-buffer": ">= 2.1.2 < 3" 705 | }, 706 | "engines": { 707 | "node": ">=0.10.0" 708 | } 709 | }, 710 | "node_modules/inherits": { 711 | "version": "2.0.4", 712 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 713 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 714 | "license": "ISC" 715 | }, 716 | "node_modules/ipaddr.js": { 717 | "version": "1.9.1", 718 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 719 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 720 | "license": "MIT", 721 | "engines": { 722 | "node": ">= 0.10" 723 | } 724 | }, 725 | "node_modules/is-arrayish": { 726 | "version": "0.3.2", 727 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", 728 | "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", 729 | "dev": true, 730 | "license": "MIT" 731 | }, 732 | "node_modules/is-promise": { 733 | "version": "4.0.0", 734 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", 735 | "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", 736 | "license": "MIT" 737 | }, 738 | "node_modules/is-stream": { 739 | "version": "2.0.1", 740 | "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", 741 | "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", 742 | "dev": true, 743 | "license": "MIT", 744 | "engines": { 745 | "node": ">=8" 746 | }, 747 | "funding": { 748 | "url": "https://github.com/sponsors/sindresorhus" 749 | } 750 | }, 751 | "node_modules/kuler": { 752 | "version": "2.0.0", 753 | "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", 754 | "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", 755 | "dev": true, 756 | "license": "MIT" 757 | }, 758 | "node_modules/logform": { 759 | "version": "2.7.0", 760 | "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", 761 | "integrity": "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==", 762 | "dev": true, 763 | "license": "MIT", 764 | "dependencies": { 765 | "@colors/colors": "1.6.0", 766 | "@types/triple-beam": "^1.3.2", 767 | "fecha": "^4.2.0", 768 | "ms": "^2.1.1", 769 | "safe-stable-stringify": "^2.3.1", 770 | "triple-beam": "^1.3.0" 771 | }, 772 | "engines": { 773 | "node": ">= 12.0.0" 774 | } 775 | }, 776 | "node_modules/math-intrinsics": { 777 | "version": "1.1.0", 778 | "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", 779 | "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", 780 | "license": "MIT", 781 | "engines": { 782 | "node": ">= 0.4" 783 | } 784 | }, 785 | "node_modules/media-typer": { 786 | "version": "1.1.0", 787 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", 788 | "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", 789 | "license": "MIT", 790 | "engines": { 791 | "node": ">= 0.8" 792 | } 793 | }, 794 | "node_modules/merge-descriptors": { 795 | "version": "2.0.0", 796 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", 797 | "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", 798 | "license": "MIT", 799 | "engines": { 800 | "node": ">=18" 801 | }, 802 | "funding": { 803 | "url": "https://github.com/sponsors/sindresorhus" 804 | } 805 | }, 806 | "node_modules/methods": { 807 | "version": "1.1.2", 808 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 809 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 810 | "license": "MIT", 811 | "engines": { 812 | "node": ">= 0.6" 813 | } 814 | }, 815 | "node_modules/mime-db": { 816 | "version": "1.53.0", 817 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.53.0.tgz", 818 | "integrity": "sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg==", 819 | "license": "MIT", 820 | "engines": { 821 | "node": ">= 0.6" 822 | } 823 | }, 824 | "node_modules/mime-types": { 825 | "version": "3.0.0", 826 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.0.tgz", 827 | "integrity": "sha512-XqoSHeCGjVClAmoGFG3lVFqQFRIrTVw2OH3axRqAcfaw+gHWIfnASS92AV+Rl/mk0MupgZTRHQOjxY6YVnzK5w==", 828 | "license": "MIT", 829 | "dependencies": { 830 | "mime-db": "^1.53.0" 831 | }, 832 | "engines": { 833 | "node": ">= 0.6" 834 | } 835 | }, 836 | "node_modules/ms": { 837 | "version": "2.1.2", 838 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 839 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 840 | "license": "MIT" 841 | }, 842 | "node_modules/negotiator": { 843 | "version": "1.0.0", 844 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", 845 | "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", 846 | "license": "MIT", 847 | "engines": { 848 | "node": ">= 0.6" 849 | } 850 | }, 851 | "node_modules/object-assign": { 852 | "version": "4.1.1", 853 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 854 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", 855 | "license": "MIT", 856 | "engines": { 857 | "node": ">=0.10.0" 858 | } 859 | }, 860 | "node_modules/object-inspect": { 861 | "version": "1.13.4", 862 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", 863 | "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", 864 | "license": "MIT", 865 | "engines": { 866 | "node": ">= 0.4" 867 | }, 868 | "funding": { 869 | "url": "https://github.com/sponsors/ljharb" 870 | } 871 | }, 872 | "node_modules/on-finished": { 873 | "version": "2.4.1", 874 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 875 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 876 | "license": "MIT", 877 | "dependencies": { 878 | "ee-first": "1.1.1" 879 | }, 880 | "engines": { 881 | "node": ">= 0.8" 882 | } 883 | }, 884 | "node_modules/once": { 885 | "version": "1.4.0", 886 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 887 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 888 | "license": "ISC", 889 | "dependencies": { 890 | "wrappy": "1" 891 | } 892 | }, 893 | "node_modules/one-time": { 894 | "version": "1.0.0", 895 | "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", 896 | "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", 897 | "dev": true, 898 | "license": "MIT", 899 | "dependencies": { 900 | "fn.name": "1.x.x" 901 | } 902 | }, 903 | "node_modules/parseurl": { 904 | "version": "1.3.3", 905 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 906 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 907 | "license": "MIT", 908 | "engines": { 909 | "node": ">= 0.8" 910 | } 911 | }, 912 | "node_modules/path-to-regexp": { 913 | "version": "8.2.0", 914 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", 915 | "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", 916 | "license": "MIT", 917 | "engines": { 918 | "node": ">=16" 919 | } 920 | }, 921 | "node_modules/pkce-challenge": { 922 | "version": "4.1.0", 923 | "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-4.1.0.tgz", 924 | "integrity": "sha512-ZBmhE1C9LcPoH9XZSdwiPtbPHZROwAnMy+kIFQVrnMCxY4Cudlz3gBOpzilgc0jOgRaiT3sIWfpMomW2ar2orQ==", 925 | "license": "MIT", 926 | "engines": { 927 | "node": ">=16.20.0" 928 | } 929 | }, 930 | "node_modules/proxy-addr": { 931 | "version": "2.0.7", 932 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 933 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 934 | "license": "MIT", 935 | "dependencies": { 936 | "forwarded": "0.2.0", 937 | "ipaddr.js": "1.9.1" 938 | }, 939 | "engines": { 940 | "node": ">= 0.10" 941 | } 942 | }, 943 | "node_modules/qs": { 944 | "version": "6.13.0", 945 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", 946 | "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", 947 | "license": "BSD-3-Clause", 948 | "dependencies": { 949 | "side-channel": "^1.0.6" 950 | }, 951 | "engines": { 952 | "node": ">=0.6" 953 | }, 954 | "funding": { 955 | "url": "https://github.com/sponsors/ljharb" 956 | } 957 | }, 958 | "node_modules/range-parser": { 959 | "version": "1.2.1", 960 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 961 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 962 | "license": "MIT", 963 | "engines": { 964 | "node": ">= 0.6" 965 | } 966 | }, 967 | "node_modules/raw-body": { 968 | "version": "3.0.0", 969 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", 970 | "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", 971 | "license": "MIT", 972 | "dependencies": { 973 | "bytes": "3.1.2", 974 | "http-errors": "2.0.0", 975 | "iconv-lite": "0.6.3", 976 | "unpipe": "1.0.0" 977 | }, 978 | "engines": { 979 | "node": ">= 0.8" 980 | } 981 | }, 982 | "node_modules/raw-body/node_modules/iconv-lite": { 983 | "version": "0.6.3", 984 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", 985 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", 986 | "license": "MIT", 987 | "dependencies": { 988 | "safer-buffer": ">= 2.1.2 < 3.0.0" 989 | }, 990 | "engines": { 991 | "node": ">=0.10.0" 992 | } 993 | }, 994 | "node_modules/readable-stream": { 995 | "version": "3.6.2", 996 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", 997 | "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", 998 | "dev": true, 999 | "license": "MIT", 1000 | "dependencies": { 1001 | "inherits": "^2.0.3", 1002 | "string_decoder": "^1.1.1", 1003 | "util-deprecate": "^1.0.1" 1004 | }, 1005 | "engines": { 1006 | "node": ">= 6" 1007 | } 1008 | }, 1009 | "node_modules/router": { 1010 | "version": "2.1.0", 1011 | "resolved": "https://registry.npmjs.org/router/-/router-2.1.0.tgz", 1012 | "integrity": "sha512-/m/NSLxeYEgWNtyC+WtNHCF7jbGxOibVWKnn+1Psff4dJGOfoXP+MuC/f2CwSmyiHdOIzYnYFp4W6GxWfekaLA==", 1013 | "license": "MIT", 1014 | "dependencies": { 1015 | "is-promise": "^4.0.0", 1016 | "parseurl": "^1.3.3", 1017 | "path-to-regexp": "^8.0.0" 1018 | }, 1019 | "engines": { 1020 | "node": ">= 18" 1021 | } 1022 | }, 1023 | "node_modules/safe-buffer": { 1024 | "version": "5.2.1", 1025 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1026 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1027 | "funding": [ 1028 | { 1029 | "type": "github", 1030 | "url": "https://github.com/sponsors/feross" 1031 | }, 1032 | { 1033 | "type": "patreon", 1034 | "url": "https://www.patreon.com/feross" 1035 | }, 1036 | { 1037 | "type": "consulting", 1038 | "url": "https://feross.org/support" 1039 | } 1040 | ], 1041 | "license": "MIT" 1042 | }, 1043 | "node_modules/safe-stable-stringify": { 1044 | "version": "2.5.0", 1045 | "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", 1046 | "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", 1047 | "dev": true, 1048 | "license": "MIT", 1049 | "engines": { 1050 | "node": ">=10" 1051 | } 1052 | }, 1053 | "node_modules/safer-buffer": { 1054 | "version": "2.1.2", 1055 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1056 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 1057 | "license": "MIT" 1058 | }, 1059 | "node_modules/send": { 1060 | "version": "1.1.0", 1061 | "resolved": "https://registry.npmjs.org/send/-/send-1.1.0.tgz", 1062 | "integrity": "sha512-v67WcEouB5GxbTWL/4NeToqcZiAWEq90N888fczVArY8A79J0L4FD7vj5hm3eUMua5EpoQ59wa/oovY6TLvRUA==", 1063 | "license": "MIT", 1064 | "dependencies": { 1065 | "debug": "^4.3.5", 1066 | "destroy": "^1.2.0", 1067 | "encodeurl": "^2.0.0", 1068 | "escape-html": "^1.0.3", 1069 | "etag": "^1.8.1", 1070 | "fresh": "^0.5.2", 1071 | "http-errors": "^2.0.0", 1072 | "mime-types": "^2.1.35", 1073 | "ms": "^2.1.3", 1074 | "on-finished": "^2.4.1", 1075 | "range-parser": "^1.2.1", 1076 | "statuses": "^2.0.1" 1077 | }, 1078 | "engines": { 1079 | "node": ">= 18" 1080 | } 1081 | }, 1082 | "node_modules/send/node_modules/fresh": { 1083 | "version": "0.5.2", 1084 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 1085 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 1086 | "license": "MIT", 1087 | "engines": { 1088 | "node": ">= 0.6" 1089 | } 1090 | }, 1091 | "node_modules/send/node_modules/mime-db": { 1092 | "version": "1.52.0", 1093 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 1094 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 1095 | "license": "MIT", 1096 | "engines": { 1097 | "node": ">= 0.6" 1098 | } 1099 | }, 1100 | "node_modules/send/node_modules/mime-types": { 1101 | "version": "2.1.35", 1102 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 1103 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 1104 | "license": "MIT", 1105 | "dependencies": { 1106 | "mime-db": "1.52.0" 1107 | }, 1108 | "engines": { 1109 | "node": ">= 0.6" 1110 | } 1111 | }, 1112 | "node_modules/send/node_modules/ms": { 1113 | "version": "2.1.3", 1114 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1115 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1116 | "license": "MIT" 1117 | }, 1118 | "node_modules/serve-static": { 1119 | "version": "2.1.0", 1120 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.1.0.tgz", 1121 | "integrity": "sha512-A3We5UfEjG8Z7VkDv6uItWw6HY2bBSBJT1KtVESn6EOoOr2jAxNhxWCLY3jDE2WcuHXByWju74ck3ZgLwL8xmA==", 1122 | "license": "MIT", 1123 | "dependencies": { 1124 | "encodeurl": "^2.0.0", 1125 | "escape-html": "^1.0.3", 1126 | "parseurl": "^1.3.3", 1127 | "send": "^1.0.0" 1128 | }, 1129 | "engines": { 1130 | "node": ">= 18" 1131 | } 1132 | }, 1133 | "node_modules/setprototypeof": { 1134 | "version": "1.2.0", 1135 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 1136 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", 1137 | "license": "ISC" 1138 | }, 1139 | "node_modules/side-channel": { 1140 | "version": "1.1.0", 1141 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", 1142 | "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", 1143 | "license": "MIT", 1144 | "dependencies": { 1145 | "es-errors": "^1.3.0", 1146 | "object-inspect": "^1.13.3", 1147 | "side-channel-list": "^1.0.0", 1148 | "side-channel-map": "^1.0.1", 1149 | "side-channel-weakmap": "^1.0.2" 1150 | }, 1151 | "engines": { 1152 | "node": ">= 0.4" 1153 | }, 1154 | "funding": { 1155 | "url": "https://github.com/sponsors/ljharb" 1156 | } 1157 | }, 1158 | "node_modules/side-channel-list": { 1159 | "version": "1.0.0", 1160 | "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", 1161 | "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", 1162 | "license": "MIT", 1163 | "dependencies": { 1164 | "es-errors": "^1.3.0", 1165 | "object-inspect": "^1.13.3" 1166 | }, 1167 | "engines": { 1168 | "node": ">= 0.4" 1169 | }, 1170 | "funding": { 1171 | "url": "https://github.com/sponsors/ljharb" 1172 | } 1173 | }, 1174 | "node_modules/side-channel-map": { 1175 | "version": "1.0.1", 1176 | "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", 1177 | "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", 1178 | "license": "MIT", 1179 | "dependencies": { 1180 | "call-bound": "^1.0.2", 1181 | "es-errors": "^1.3.0", 1182 | "get-intrinsic": "^1.2.5", 1183 | "object-inspect": "^1.13.3" 1184 | }, 1185 | "engines": { 1186 | "node": ">= 0.4" 1187 | }, 1188 | "funding": { 1189 | "url": "https://github.com/sponsors/ljharb" 1190 | } 1191 | }, 1192 | "node_modules/side-channel-weakmap": { 1193 | "version": "1.0.2", 1194 | "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", 1195 | "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", 1196 | "license": "MIT", 1197 | "dependencies": { 1198 | "call-bound": "^1.0.2", 1199 | "es-errors": "^1.3.0", 1200 | "get-intrinsic": "^1.2.5", 1201 | "object-inspect": "^1.13.3", 1202 | "side-channel-map": "^1.0.1" 1203 | }, 1204 | "engines": { 1205 | "node": ">= 0.4" 1206 | }, 1207 | "funding": { 1208 | "url": "https://github.com/sponsors/ljharb" 1209 | } 1210 | }, 1211 | "node_modules/simple-swizzle": { 1212 | "version": "0.2.2", 1213 | "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", 1214 | "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", 1215 | "dev": true, 1216 | "license": "MIT", 1217 | "dependencies": { 1218 | "is-arrayish": "^0.3.1" 1219 | } 1220 | }, 1221 | "node_modules/stack-trace": { 1222 | "version": "0.0.10", 1223 | "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", 1224 | "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", 1225 | "dev": true, 1226 | "license": "MIT", 1227 | "engines": { 1228 | "node": "*" 1229 | } 1230 | }, 1231 | "node_modules/statuses": { 1232 | "version": "2.0.1", 1233 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 1234 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 1235 | "license": "MIT", 1236 | "engines": { 1237 | "node": ">= 0.8" 1238 | } 1239 | }, 1240 | "node_modules/string_decoder": { 1241 | "version": "1.3.0", 1242 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 1243 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 1244 | "dev": true, 1245 | "license": "MIT", 1246 | "dependencies": { 1247 | "safe-buffer": "~5.2.0" 1248 | } 1249 | }, 1250 | "node_modules/text-hex": { 1251 | "version": "1.0.0", 1252 | "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", 1253 | "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", 1254 | "dev": true, 1255 | "license": "MIT" 1256 | }, 1257 | "node_modules/toidentifier": { 1258 | "version": "1.0.1", 1259 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 1260 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 1261 | "license": "MIT", 1262 | "engines": { 1263 | "node": ">=0.6" 1264 | } 1265 | }, 1266 | "node_modules/triple-beam": { 1267 | "version": "1.4.1", 1268 | "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", 1269 | "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", 1270 | "dev": true, 1271 | "license": "MIT", 1272 | "engines": { 1273 | "node": ">= 14.0.0" 1274 | } 1275 | }, 1276 | "node_modules/type-is": { 1277 | "version": "2.0.0", 1278 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.0.tgz", 1279 | "integrity": "sha512-gd0sGezQYCbWSbkZr75mln4YBidWUN60+devscpLF5mtRDUpiaTvKpBNrdaCvel1NdR2k6vclXybU5fBd2i+nw==", 1280 | "license": "MIT", 1281 | "dependencies": { 1282 | "content-type": "^1.0.5", 1283 | "media-typer": "^1.1.0", 1284 | "mime-types": "^3.0.0" 1285 | }, 1286 | "engines": { 1287 | "node": ">= 0.6" 1288 | } 1289 | }, 1290 | "node_modules/typescript": { 1291 | "version": "4.9.5", 1292 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", 1293 | "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", 1294 | "dev": true, 1295 | "license": "Apache-2.0", 1296 | "bin": { 1297 | "tsc": "bin/tsc", 1298 | "tsserver": "bin/tsserver" 1299 | }, 1300 | "engines": { 1301 | "node": ">=4.2.0" 1302 | } 1303 | }, 1304 | "node_modules/undici-types": { 1305 | "version": "6.19.8", 1306 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", 1307 | "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", 1308 | "dev": true, 1309 | "license": "MIT" 1310 | }, 1311 | "node_modules/unpipe": { 1312 | "version": "1.0.0", 1313 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1314 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 1315 | "license": "MIT", 1316 | "engines": { 1317 | "node": ">= 0.8" 1318 | } 1319 | }, 1320 | "node_modules/util-deprecate": { 1321 | "version": "1.0.2", 1322 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1323 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", 1324 | "dev": true, 1325 | "license": "MIT" 1326 | }, 1327 | "node_modules/utils-merge": { 1328 | "version": "1.0.1", 1329 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1330 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 1331 | "license": "MIT", 1332 | "engines": { 1333 | "node": ">= 0.4.0" 1334 | } 1335 | }, 1336 | "node_modules/vary": { 1337 | "version": "1.1.2", 1338 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1339 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 1340 | "license": "MIT", 1341 | "engines": { 1342 | "node": ">= 0.8" 1343 | } 1344 | }, 1345 | "node_modules/winston": { 1346 | "version": "3.17.0", 1347 | "resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz", 1348 | "integrity": "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==", 1349 | "dev": true, 1350 | "license": "MIT", 1351 | "dependencies": { 1352 | "@colors/colors": "^1.6.0", 1353 | "@dabh/diagnostics": "^2.0.2", 1354 | "async": "^3.2.3", 1355 | "is-stream": "^2.0.0", 1356 | "logform": "^2.7.0", 1357 | "one-time": "^1.0.0", 1358 | "readable-stream": "^3.4.0", 1359 | "safe-stable-stringify": "^2.3.1", 1360 | "stack-trace": "0.0.x", 1361 | "triple-beam": "^1.3.0", 1362 | "winston-transport": "^4.9.0" 1363 | }, 1364 | "engines": { 1365 | "node": ">= 12.0.0" 1366 | } 1367 | }, 1368 | "node_modules/winston-transport": { 1369 | "version": "4.9.0", 1370 | "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz", 1371 | "integrity": "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==", 1372 | "dev": true, 1373 | "license": "MIT", 1374 | "dependencies": { 1375 | "logform": "^2.7.0", 1376 | "readable-stream": "^3.6.2", 1377 | "triple-beam": "^1.3.0" 1378 | }, 1379 | "engines": { 1380 | "node": ">= 12.0.0" 1381 | } 1382 | }, 1383 | "node_modules/wrappy": { 1384 | "version": "1.0.2", 1385 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1386 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 1387 | "license": "ISC" 1388 | }, 1389 | "node_modules/zod": { 1390 | "version": "3.24.2", 1391 | "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz", 1392 | "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==", 1393 | "license": "MIT", 1394 | "funding": { 1395 | "url": "https://github.com/sponsors/colinhacks" 1396 | } 1397 | }, 1398 | "node_modules/zod-to-json-schema": { 1399 | "version": "3.24.3", 1400 | "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.3.tgz", 1401 | "integrity": "sha512-HIAfWdYIt1sssHfYZFCXp4rU1w2r8hVVXYIlmoa0r0gABLs5di3RCqPU5DDROogVz1pAdYBaz7HK5n9pSUNs3A==", 1402 | "license": "ISC", 1403 | "peerDependencies": { 1404 | "zod": "^3.24.1" 1405 | } 1406 | } 1407 | } 1408 | } 1409 | -------------------------------------------------------------------------------- /claude-code-server/src/declarations.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@modelcontextprotocol/sdk/server/index.js' { 2 | export class Server { 3 | constructor(config: { name: string, version: string }, options: { capabilities: { resources: any, tools: any } }); 4 | setRequestHandler(schema: any, handler: (request: any) => Promise): void; 5 | connect(transport: any): Promise; 6 | close(): Promise; 7 | onerror: (error: any) => void; 8 | } 9 | export default Server; 10 | } 11 | 12 | declare module '@modelcontextprotocol/sdk/server/stdio.js' { 13 | export class StdioServerTransport {} 14 | } 15 | 16 | declare module '@modelcontextprotocol/sdk/types.js' { 17 | export const CallToolRequestSchema: any; 18 | export const ListToolsRequestSchema: any; 19 | export class McpError extends Error { 20 | constructor(code: number, message: string); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /claude-code-server/src/index.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import { Server } from '@modelcontextprotocol/sdk/server/index.js'; 3 | import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; 4 | import { CallToolRequestSchema, ListToolsRequestSchema, McpError } from '@modelcontextprotocol/sdk/types.js'; 5 | import child_process from 'child_process'; 6 | import * as dotenv from 'dotenv'; 7 | import winston from 'winston'; 8 | import path from 'path'; 9 | import { fileURLToPath } from 'url'; 10 | import { dirname } from 'path'; 11 | import * as fs from 'fs'; 12 | import os from 'os'; // Import the os module 13 | 14 | const __filename = fileURLToPath(import.meta.url); 15 | const __dirname = dirname(__filename); 16 | 17 | // ロガーのフォーマット設定を共通化 18 | const createLoggerFormat = () => { 19 | return winston.format.combine( 20 | winston.format.timestamp(), 21 | winston.format.printf(({ timestamp, level, message }) => { 22 | return `[${timestamp}] [${level}] ${message}`; 23 | }) 24 | ); 25 | }; 26 | 27 | // 初期ロガーの設定(.envの読み込み前に最小限のロガーを設定) 28 | const initialLogger = winston.createLogger({ 29 | level: 'info', 30 | format: createLoggerFormat(), 31 | transports: [ 32 | new winston.transports.Console() 33 | ] 34 | }); 35 | 36 | // MCP Hostからの環境変数を優先し、.envファイルはフォールバックとして扱う 37 | if (!process.env.CLAUDE_BIN) { 38 | const envPaths = [ 39 | path.resolve(__dirname, '../.env'), // 開発環境 40 | path.resolve(__dirname, '../../.env'), // ビルド後の環境 41 | path.resolve(process.cwd(), '.env'), // カレントディレクトリの .env 42 | path.resolve(process.cwd(), 'claude-code-server/.env'), // プロジェクトサブディレクトリの .env (後方互換性) 43 | path.resolve(os.homedir(), '.claude-code-mcp.env') // ホームディレクトリの .claude-code-mcp.env 44 | ]; 45 | 46 | for (const envPath of envPaths) { 47 | if (fs.existsSync(envPath)) { 48 | const result = dotenv.config({ path: envPath }); 49 | if (result.error) { 50 | initialLogger.error(`Failed to load .env file from ${envPath}: ${result.error.message}`); 51 | } else { 52 | initialLogger.info(`Successfully loaded .env file from ${envPath}`); 53 | initialLogger.debug(`Loaded environment variables: LOG_LEVEL=${process.env.LOG_LEVEL}, CLAUDE_BIN=${process.env.CLAUDE_BIN}`); 54 | break; 55 | } 56 | } else { 57 | initialLogger.debug(`CLAUDE_BIN fallback search: environment file at ${envPath} does not exist [MCP Host settings: not found]`); 58 | } 59 | } 60 | } 61 | 62 | // ログレベルの明示的な確認(デバッグ用) 63 | console.log(`Environment variable LOG_LEVEL: ${process.env.LOG_LEVEL}`); 64 | initialLogger.debug(`Current initial logger level: ${initialLogger.level}`); 65 | 66 | // ログファイルパスを決定するシンプルな方法 67 | let logFilePath: string | null = null; 68 | 69 | // 1. まずプロジェクトルートに書き込みを試みる 70 | try { 71 | const projectLogPath = path.resolve(__dirname, '../../claude-code-server.log'); 72 | initialLogger.debug(`Attempting to write to project root log: ${projectLogPath}`); 73 | fs.writeFileSync(projectLogPath, `# Log file initialization at ${new Date().toISOString()}\n`, { flag: 'a' }); 74 | logFilePath = projectLogPath; 75 | console.log(`Created log file in project root: ${logFilePath}`); 76 | initialLogger.debug(`Successfully created/accessed log file at: ${logFilePath}`); 77 | } catch (err) { 78 | console.error(`Error writing to project root: ${err instanceof Error ? err.message : String(err)}`); 79 | initialLogger.debug(`Failed to write to project root log with error: ${err instanceof Error ? err.stack : String(err)}`); 80 | 81 | // 2. 次にホームディレクトリに試みる 82 | try { 83 | const homeDir = process.env.HOME || process.env.USERPROFILE; 84 | if (homeDir) { 85 | const homeLogPath = path.resolve(homeDir, '.claude-code-server.log'); 86 | initialLogger.debug(`Attempting to write to home directory log: ${homeLogPath}`); 87 | fs.writeFileSync(homeLogPath, `# Log file initialization at ${new Date().toISOString()}\n`, { flag: 'a' }); 88 | console.log(`Created log file in home directory: ${homeLogPath}`); 89 | logFilePath = homeLogPath; 90 | initialLogger.debug(`Successfully created/accessed log file at: ${logFilePath}`); 91 | } 92 | } catch (err2) { 93 | console.error(`Error writing to home directory: ${err2 instanceof Error ? err2.message : String(err2)}`); 94 | initialLogger.debug(`Failed to write to home directory log with error: ${err2 instanceof Error ? err2.stack : String(err2)}`); 95 | 96 | // 3. 最後に/tmpに試す 97 | try { 98 | const tmpPath = '/tmp/claude-code-server.log'; 99 | initialLogger.debug(`Attempting to write to temp directory log: ${tmpPath}`); 100 | fs.writeFileSync(tmpPath, `# Log file initialization at ${new Date().toISOString()}\n`, { flag: 'a' }); 101 | logFilePath = tmpPath; 102 | console.log(`Created log file in temp directory: ${logFilePath}`); 103 | initialLogger.debug(`Successfully created/accessed log file at: ${logFilePath}`); 104 | } catch (err3) { 105 | console.error('All log file paths failed. Logs will be console-only.'); 106 | initialLogger.debug(`Failed to write to temp directory log with error: ${err3 instanceof Error ? err3.stack : String(err3)}`); 107 | logFilePath = null; 108 | } 109 | } 110 | } 111 | 112 | // 環境変数からログレベルを確実に取得 113 | const logLevel = process.env.LOG_LEVEL || 'info'; 114 | console.log(`Setting log level to: ${logLevel}`); 115 | initialLogger.debug(`Configured log level from environment: ${logLevel}`); 116 | 117 | // Winstonロガーの設定 118 | const logger = winston.createLogger({ 119 | // 環境変数からログレベルを設定 120 | level: logLevel, 121 | format: winston.format.combine( 122 | winston.format.timestamp(), 123 | winston.format.printf(({ timestamp, level, message }) => { 124 | return `[${timestamp}] [${level}] ${message}`; 125 | }) 126 | ), 127 | transports: [ 128 | // コンソールトランスポートもログレベル設定を継承 129 | new winston.transports.Console({ level: logLevel }) 130 | ] 131 | }); 132 | 133 | logger.debug('Winston logger created with console transport'); 134 | 135 | // ファイルトランスポートの追加 136 | if (logFilePath) { 137 | try { 138 | // ファイルトランスポートを作成 139 | const fileTransport = new winston.transports.File({ 140 | filename: logFilePath, 141 | // 明示的にログレベルを設定 142 | level: logLevel, 143 | options: { flags: 'a' } 144 | }); 145 | 146 | // ファイルトランスポート追加 147 | logger.add(fileTransport); 148 | console.log(`Added log file: ${logFilePath}`); 149 | logger.debug(`File transport added to logger with level: ${logLevel}`); 150 | 151 | // 同期書き込みテスト - シンプルな起動メッセージのみに置き換え 152 | fs.appendFileSync(logFilePath, `# System startup - ${new Date().toISOString()}\n`); 153 | logger.debug(`Wrote startup marker to log file`); 154 | } catch (err) { 155 | console.error('File transport setup error:', err); 156 | logger.debug(`Failed to setup file transport: ${err instanceof Error ? err.stack : String(err)}`); 157 | } 158 | } 159 | 160 | // 起動時にシンプルなログを書き込み 161 | logger.info('=== Claude Code Server started ==='); 162 | logger.debug('Server initialization sequence started'); 163 | 164 | // ファイル情報の診断 - デバッグモードでのみ詳細表示 165 | if (logFilePath && logLevel === 'debug') { 166 | try { 167 | const stats = fs.statSync(logFilePath); 168 | logger.debug(`Log file information (${logFilePath}): size=${stats.size} bytes, mode=${stats.mode.toString(8)}, uid=${stats.uid}, gid=${stats.gid}`); 169 | } catch (err) { 170 | logger.error('Failed to get file information:', err); 171 | } 172 | } 173 | 174 | // ログフラッシュ関数をシンプル化 175 | const flushLog = () => { 176 | logger.debug('Flushing logs to disk'); 177 | 178 | if (logFilePath) { 179 | try { 180 | // 同期的に書き込み 181 | fs.appendFileSync(logFilePath, `\n# Process terminated: ${new Date().toISOString()}\n`); 182 | logger.debug('Wrote termination marker to log file'); 183 | } catch (appendErr) { 184 | console.error('Error writing log on termination:', appendErr); 185 | logger.debug(`Failed to write termination marker: ${appendErr instanceof Error ? appendErr.stack : String(appendErr)}`); 186 | } 187 | } 188 | 189 | try { 190 | // Winstonのクローズを試みる(エラーを無視) 191 | logger.debug('Closing Winston logger'); 192 | logger.close(); 193 | } catch (err) { 194 | // 無視 195 | logger.debug(`Error while closing logger: ${err instanceof Error ? err.message : String(err)}`); 196 | } 197 | }; 198 | 199 | // プロセス終了時にログを確実にフラッシュ 200 | process.on('exit', () => { 201 | logger.debug('Process exit event detected'); 202 | flushLog(); 203 | }); 204 | 205 | // SIGINT (Ctrl+C) 処理 206 | process.on('SIGINT', () => { 207 | logger.info('Received SIGINT. Shutting down.'); 208 | logger.debug('SIGINT handler triggered'); 209 | flushLog(); 210 | process.exit(0); 211 | }); 212 | 213 | // 未処理の例外をキャッチ 214 | process.on('uncaughtException', (err) => { 215 | logger.error(`Uncaught exception: ${err.message}`); 216 | logger.error(err.stack); 217 | logger.debug('Uncaught exception handler triggered'); 218 | flushLog(); 219 | process.exit(1); 220 | }); 221 | 222 | // CLAUDE_BIN Validation 223 | let validatedClaudePath: string | null = null; 224 | const EXPECTED_EXECUTABLE_BASENAME = 'claude'; 225 | const IS_WINDOWS = process.platform === 'win32'; 226 | 227 | const claudeBinFromEnv = process.env.CLAUDE_BIN; 228 | 229 | if (!claudeBinFromEnv) { 230 | logger.error("CRITICAL: CLAUDE_BIN environment variable is not set. This is a required setting. Server exiting."); 231 | process.exit(1); 232 | } 233 | 234 | const resolvedPath = path.resolve(claudeBinFromEnv); 235 | const basename = path.basename(resolvedPath); 236 | 237 | let isValidBasename = false; 238 | if (IS_WINDOWS) { 239 | isValidBasename = (basename.toLowerCase() === EXPECTED_EXECUTABLE_BASENAME || basename.toLowerCase() === `${EXPECTED_EXECUTABLE_BASENAME}.exe`); 240 | } else { 241 | isValidBasename = (basename === EXPECTED_EXECUTABLE_BASENAME); 242 | } 243 | 244 | if (!isValidBasename) { 245 | logger.error(`CRITICAL: CLAUDE_BIN ("${claudeBinFromEnv}") resolved to "${resolvedPath}", which does not have the expected basename "${EXPECTED_EXECUTABLE_BASENAME}". Basename found: "${basename}". Server exiting.`); 246 | process.exit(1); 247 | } 248 | 249 | try { 250 | fs.accessSync(resolvedPath, fs.constants.X_OK); // Check for existence and execute permission 251 | validatedClaudePath = resolvedPath; // Set the validated path 252 | logger.info(`CLAUDE_BIN validated. Using executable: ${validatedClaudePath}`); 253 | 254 | // Now, perform the version check using the validated path 255 | try { 256 | logger.debug(`Checking Claude CLI version at path: ${validatedClaudePath}`); 257 | // Quote the path in case it contains spaces, for reliability with execSync 258 | const versionOutput = child_process.execSync(`"${validatedClaudePath}" --version`, { encoding: 'utf8' }); 259 | logger.info(`Claude CLI Version: ${versionOutput.trim()}`); 260 | } catch (err) { 261 | logger.warn(`Could not get Claude CLI version from validated path "${validatedClaudePath}". It might not be a valid Claude executable or is not working correctly. Error: ${err instanceof Error ? err.message : String(err)}`); 262 | logger.debug(`Failed to execute Claude CLI for version check: ${err instanceof Error ? err.stack : String(err)}`); 263 | // Original code continued even if version check failed, so this does too. 264 | // The main validation (name, existence, executability) has already passed. 265 | } 266 | 267 | } catch (err) { 268 | logger.error(`CRITICAL: CLAUDE_BIN ("${claudeBinFromEnv}") resolved to "${resolvedPath}", but it is not executable or does not exist. Error: ${err instanceof Error ? err.message : String(err)}. Server exiting.`); 269 | process.exit(1); 270 | } 271 | 272 | // Base64 エンコード/デコード ヘルパー関数 273 | function encodeText(text: string): string { 274 | return Buffer.from(text, 'utf8').toString('base64'); 275 | } 276 | 277 | function decodeText(encoded: string): string { 278 | return Buffer.from(encoded, 'base64').toString('utf8'); 279 | } 280 | 281 | class ClaudeCodeServer { 282 | private server: Server; 283 | 284 | constructor() { 285 | logger.debug('Initializing Claude Code Server'); 286 | this.server = new Server( 287 | { 288 | name: 'claude-code-server', 289 | version: '0.1.0', 290 | }, 291 | { 292 | capabilities: { 293 | resources: {}, 294 | tools: {}, 295 | }, 296 | } 297 | ); 298 | 299 | logger.debug('Setting up tool handlers'); 300 | this.setupToolHandlers(); 301 | 302 | this.server.onerror = (error: any) => { 303 | logger.error('[MCP Error]', error); 304 | logger.debug(`MCP server error details: ${error instanceof Error ? error.stack : JSON.stringify(error)}`); 305 | }; 306 | 307 | process.on('SIGINT', async () => { 308 | logger.debug('SIGINT received in server handler'); 309 | await this.server.close(); 310 | process.exit(0); 311 | }); 312 | 313 | logger.debug('Claude Code Server initialization completed'); 314 | } 315 | 316 | private setupToolHandlers() { 317 | // ツールリストの設定 318 | logger.debug('Registering ListTools request handler'); 319 | this.server.setRequestHandler(ListToolsRequestSchema, async () => { 320 | logger.debug('ListTools handler called'); 321 | return { 322 | tools: [ 323 | { 324 | name: 'explain_code', 325 | description: 'Provides detailed explanation of the given code.', 326 | inputSchema: { 327 | type: 'object', 328 | properties: { 329 | code: { type: 'string', description: 'Target code' }, 330 | context: { type: 'string', description: 'Additional context', default: '' } 331 | }, 332 | required: ['code'] 333 | } 334 | }, 335 | { 336 | name: 'review_code', 337 | description: 'Reviews the given code.', 338 | inputSchema: { 339 | type: 'object', 340 | properties: { 341 | code: { type: 'string', description: 'Code to review' }, 342 | focus_areas: { type: 'string', description: 'Areas to focus on', default: '' } 343 | }, 344 | required: ['code'] 345 | } 346 | }, 347 | { 348 | name: 'fix_code', 349 | description: 'Fixes bugs or issues in the given code.', 350 | inputSchema: { 351 | type: 'object', 352 | properties: { 353 | code: { type: 'string', description: 'Code to fix' }, 354 | issue_description: { type: 'string', description: 'Description of the issue' } 355 | }, 356 | required: ['code', 'issue_description'] 357 | } 358 | }, 359 | { 360 | name: 'edit_code', 361 | description: 'Edits the given code based on instructions.', 362 | inputSchema: { 363 | type: 'object', 364 | properties: { 365 | code: { type: 'string', description: 'Code to edit' }, 366 | instructions: { type: 'string', description: 'Editing instructions' } 367 | }, 368 | required: ['code', 'instructions'] 369 | } 370 | }, 371 | { 372 | name: 'test_code', 373 | description: 'Generates tests for the given code.', 374 | inputSchema: { 375 | type: 'object', 376 | properties: { 377 | code: { type: 'string', description: 'Code to test' }, 378 | test_framework: { type: 'string', description: 'Test framework to use', default: '' } 379 | }, 380 | required: ['code'] 381 | } 382 | }, 383 | { 384 | name: 'simulate_command', 385 | description: 'Simulates the execution of a given command.', 386 | inputSchema: { 387 | type: 'object', 388 | properties: { 389 | command: { type: 'string', description: 'Command to execute' }, 390 | input: { type: 'string', description: 'Input data', default: '' } 391 | }, 392 | required: ['command'] 393 | } 394 | }, 395 | { 396 | name: 'your_own_query', 397 | description: 'Sends a custom query with context.', 398 | inputSchema: { 399 | type: 'object', 400 | properties: { 401 | query: { type: 'string', description: 'Query text' }, 402 | context: { type: 'string', description: 'Additional context', default: '' } 403 | }, 404 | required: ['query'] 405 | } 406 | } 407 | ] 408 | }; 409 | }); 410 | 411 | // ツール実行リクエスト処理 412 | logger.debug('Registering CallTool request handler'); 413 | this.server.setRequestHandler(CallToolRequestSchema, async (request: any) => { 414 | const { name, arguments: args } = request.params; 415 | logger.debug(`CallTool handler called for tool: ${name} with args: ${JSON.stringify(args, null, 2)}`); 416 | 417 | const runClaudeCommand = (claudeArgs: string[], stdinInput?: string): Promise => { 418 | return new Promise((resolve, reject) => { 419 | // タイムアウト設定 (5分) 420 | const timeoutMs = 5 * 60 * 1000; 421 | let timeoutId: NodeJS.Timeout; 422 | 423 | try { 424 | // より詳細なデバッグ情報 425 | logger.debug(`Executing Claude CLI at path: ${validatedClaudePath}`); 426 | logger.debug(`Claude CLI arguments: ${JSON.stringify(claudeArgs)}`); 427 | if (stdinInput) logger.debug(`Input length: ${stdinInput.length} characters`); 428 | 429 | // 環境変数をログに出力 430 | logger.debug(`Environment PATH: ${process.env.PATH}`); 431 | 432 | if (validatedClaudePath === null) { 433 | logger.error('validatedClaudePath is null. Claude CLI cannot be executed.'); 434 | // エラーをクライアントに返すなど、より丁寧なエラー処理を検討してください。 435 | throw new Error('Validated Claude CLI path is not available. Please check CLAUDE_BIN environment variable or server configuration.'); 436 | } 437 | 438 | const proc = child_process.spawn(validatedClaudePath, claudeArgs, { 439 | env: { ...process.env }, 440 | stdio: ['pipe', 'pipe', 'pipe'] 441 | }) as child_process.ChildProcess; 442 | 443 | // 標準入力がある場合は書き込みと終了 444 | if (stdinInput) { 445 | proc.stdin!.write(stdinInput); 446 | proc.stdin!.end(); 447 | logger.debug('Wrote input to Claude CLI stdin'); 448 | } 449 | 450 | let stdout = ''; 451 | let stderr = ''; 452 | 453 | proc.stdout!.on('data', (data: string) => { 454 | const chunk = data.toString(); 455 | stdout += chunk; 456 | logger.debug(`Received stdout chunk: ${chunk.length} bytes`); 457 | }); 458 | 459 | proc.stderr!.on('data', (data: string) => { 460 | const chunk = data.toString(); 461 | stderr += chunk; 462 | logger.error(`Claude stderr: ${chunk}`); 463 | logger.debug(`Claude stderr output: ${chunk}`); 464 | }); 465 | 466 | // タイムアウト設定 467 | timeoutId = setTimeout(() => { 468 | logger.error(`Command timed out after ${timeoutMs/1000} seconds`); 469 | logger.debug('Killing process due to timeout'); 470 | proc.kill(); 471 | reject(new Error(`Command timed out after ${timeoutMs / 1000} seconds`)); 472 | }, timeoutMs); 473 | 474 | proc.on('close', (code: number) => { 475 | clearTimeout(timeoutId); 476 | logger.debug(`Claude process closed with code: ${code}`); 477 | if (code === 0) { 478 | logger.debug(`Claude command completed successfully, output length: ${stdout.length} bytes`); 479 | resolve(stdout.trim()); 480 | } 481 | else { 482 | logger.error(`Command failed with code ${code}`); 483 | logger.debug(`stderr: ${stderr}`); 484 | reject(new Error(`Command failed with code ${code}: ${stderr}`)); 485 | } 486 | }); 487 | 488 | proc.on('error', (err: Error) => { 489 | clearTimeout(timeoutId); 490 | logger.error("Process spawn error:", err); 491 | logger.debug(`Process error details: ${err.stack}`); 492 | reject(err); 493 | }); 494 | } catch (err) { 495 | logger.error("Failed to spawn process:", err); 496 | logger.debug(`Spawn failure details: ${err instanceof Error ? err.stack : String(err)}`); 497 | reject(err); 498 | } 499 | }); 500 | }; 501 | 502 | try { 503 | // 文字列の最大長さを制限する関数 504 | const truncateIfNeeded = (str: string, maxLength = 10000): string => { 505 | if (str.length > maxLength) { 506 | logger.warn(`Warning: Input too long, truncating (${str.length} -> ${maxLength})`); 507 | return str.substring(0, maxLength) + "... [truncated]"; 508 | } 509 | return str; 510 | }; 511 | 512 | // エラーを適切に処理するために各ケースを try-catch で囲む 513 | switch (name) { 514 | case 'explain_code': { 515 | const { code, context } = args; 516 | try { 517 | logger.debug(`Processing explain_code request, code length: ${code.length}`); 518 | const encodedCode = encodeText(truncateIfNeeded(code)); 519 | logger.debug(`Code encoded to base64, length: ${encodedCode.length}`); 520 | // ファイルを使用して大きな入力を渡す場合の代替方法 521 | const prompt = `You are super professional engineer. Please kindly provide a detailed explanation of the following Base64 encoded code:\n\n${encodedCode}\n\nAdditional context (if provided):\n${context || 'No additional context provided.'}`; 522 | logger.debug('Calling Claude CLI with prompt'); 523 | const output = await runClaudeCommand(['--print'], prompt); 524 | logger.debug(`Received response from Claude, length: ${output.length}`); 525 | return { content: [{ type: 'text', text: output }] }; 526 | } catch (err) { 527 | logger.error("Error in explain_code:", err); 528 | logger.debug(`explain_code error details: ${err instanceof Error ? err.stack : String(err)}`); 529 | throw err; 530 | } 531 | } 532 | case 'review_code': { 533 | const { code, focus_areas } = args; 534 | try { 535 | logger.debug(`Processing review_code request, code length: ${code.length}`); 536 | const encodedCode = encodeText(truncateIfNeeded(code)); 537 | logger.debug(`Code encoded to base64, length: ${encodedCode.length}`); 538 | const prompt = `You are super professional engineer. Please review the following Base64 encoded code. Consider code readability, efficiency, potential bugs, and security vulnerabilities.\n\nCode:\n${encodedCode}\n\nFocus areas (if provided):\n${focus_areas || 'No specific focus areas provided.'}`; 539 | logger.debug('Calling Claude CLI with prompt'); 540 | const output = await runClaudeCommand(['--print'], prompt); 541 | logger.debug(`Received response from Claude, length: ${output.length}`); 542 | return { content: [{ type: 'text', text: output }] }; 543 | } catch (err) { 544 | logger.error("Error in review_code:", err); 545 | logger.debug(`review_code error details: ${err instanceof Error ? err.stack : String(err)}`); 546 | throw err; 547 | } 548 | } 549 | case 'fix_code': { 550 | const { code, issue_description } = args; 551 | logger.debug(`Processing fix_code request, code length: ${code.length}`); 552 | const encodedCode = encodeText(truncateIfNeeded(code)); 553 | logger.debug(`Code encoded to base64, length: ${encodedCode.length}`); 554 | const prompt = `You are super professional engineer. Please fix the following Base64 encoded code, addressing the issue described below:\n\nCode:\n${encodedCode}\n\nIssue description:\n${issue_description ?? 'No specific issue described.'}`; 555 | logger.debug('Calling Claude CLI with prompt'); 556 | const output = await runClaudeCommand(['--print'], prompt); 557 | logger.debug(`Received response from Claude, length: ${output.length}`); 558 | return { content: [{ type: 'text', text: output }] }; 559 | } 560 | case 'edit_code': { 561 | const { code, instructions } = args; 562 | logger.debug(`Processing edit_code request, code length: ${code.length}`); 563 | const encodedCode = encodeText(truncateIfNeeded(code)); 564 | logger.debug(`Code encoded to base64, length: ${encodedCode.length}`); 565 | const prompt = `You are super professional engineer. Please edit the following Base64 encoded code according to the instructions provided:\n\nCode:\n${encodedCode}\n\nInstructions:\n${instructions ?? 'No specific instructions provided.'}`; 566 | logger.debug('Calling Claude CLI with prompt'); 567 | const output = await runClaudeCommand(['--print'], prompt); 568 | logger.debug(`Received response from Claude, length: ${output.length}`); 569 | return { content: [{ type: 'text', text: output }] }; 570 | } 571 | case 'test_code': { 572 | const { code, test_framework } = args; 573 | logger.debug(`Processing test_code request, code length: ${code.length}`); 574 | const encodedCode = encodeText(truncateIfNeeded(code)); 575 | logger.debug(`Code encoded to base64, length: ${encodedCode.length}`); 576 | const framework = test_framework || 'default'; 577 | const prompt = `You are super professional engineer. Please generate tests for the following Base64 encoded code.\n\nCode:\n${encodedCode}\n\nTest framework (if specified):\n${framework || 'No specific framework provided. Please use a suitable default framework.'}`; 578 | logger.debug('Calling Claude CLI with prompt'); 579 | const output = await runClaudeCommand(['--print'], prompt); 580 | logger.debug(`Received response from Claude, length: ${output.length}`); 581 | return { content: [{ type: 'text', text: output }] }; 582 | } 583 | case 'simulate_command': { 584 | const { command, input } = args; 585 | logger.debug(`Processing simulate_command request, command: ${command}`); 586 | const prompt = `You are super professional engineer. Simulate the execution of the following command:\n\nCommand: ${command}\n\nInput: ${input || 'No input provided.'}\n\nDescribe the expected behavior and output, without actually executing the command.`; 587 | logger.debug('Calling Claude CLI with prompt'); 588 | const output = await runClaudeCommand(['--print'], prompt); 589 | logger.debug(`Received response from Claude, length: ${output.length}`); 590 | return { content: [{ type: 'text', text: output }] }; 591 | } 592 | case 'your_own_query': { 593 | const { query, context } = args; 594 | logger.debug(`Processing your_own_query request, query length: ${query.length}`); 595 | const prompt = `Query: ${query} ${context || ''}`; 596 | logger.debug('Calling Claude CLI with prompt'); 597 | const output = await runClaudeCommand(['--print'], prompt); 598 | logger.debug(`Received response from Claude, length: ${output.length}`); 599 | return { content: [{ type: 'text', text: output }] }; 600 | } 601 | default: 602 | throw new McpError(404, "Unknown tool: " + name); 603 | } 604 | } catch (err) { 605 | logger.error("Error executing tool:", err); 606 | logger.debug(`Tool execution error details: ${err instanceof Error ? err.stack : String(err)}`); 607 | throw new McpError(500, err instanceof Error ? err.message : String(err)); 608 | } 609 | }); 610 | } 611 | 612 | async run() { 613 | logger.debug('Starting Claude Code MCP server'); 614 | const transport = new StdioServerTransport(); 615 | logger.debug('Created StdioServerTransport'); 616 | await this.server.connect(transport); 617 | logger.info("Claude Code MCP server running on stdio"); 618 | logger.debug('Server connected to transport and ready to process requests'); 619 | } 620 | } 621 | 622 | const server = new ClaudeCodeServer(); 623 | server.run().catch((err) => { 624 | logger.error('Failed to start server:', err); 625 | logger.debug(`Server start failure details: ${err instanceof Error ? err.stack : String(err)}`); 626 | console.error(err); 627 | }); 628 | -------------------------------------------------------------------------------- /claude-code-server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "ES2020", 4 | "target": "ES2020", 5 | "moduleResolution": "node", 6 | "outDir": "build", 7 | "strict": true, 8 | "esModuleInterop": true, 9 | "types": ["node"], 10 | "skipLibCheck": true 11 | }, 12 | "include": ["src"] 13 | } 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@kunihiros/claude-code-mcp", 3 | "version": "0.1.3", 4 | "description": "MCP server for Claude Code", 5 | "main": "claude-code-server/build/index.js", 6 | "type": "module", 7 | "bin": { 8 | "claude-code-mcp": "./claude-code-server/build/index.js" 9 | }, 10 | "files": [ 11 | "claude-code-server/build/**/*", 12 | "README.md", 13 | "LICENSE", 14 | "claude-code-server/.env.example" 15 | ], 16 | "scripts": { 17 | "build": "cd claude-code-server && npx tsc && chmod +x build/index.js", 18 | "start": "node claude-code-server/build/index.js", 19 | "prepublishOnly": "npm run build" 20 | }, 21 | "dependencies": { 22 | "@modelcontextprotocol/sdk": "^1.0.0", 23 | "dotenv": "^16.4.5", 24 | "winston": "^3.13.0" 25 | }, 26 | "devDependencies": { 27 | "@anthropic-ai/claude-code": "^0.2.103", 28 | "@types/dotenv": "^8.2.0", 29 | "@types/node": "^20.17.43", 30 | "typescript": "^4.9.5" 31 | }, 32 | "keywords": [ 33 | "claude", 34 | "claude-code", 35 | "mcp", 36 | "anthropic", 37 | "ai", 38 | "model-context-protocol" 39 | ], 40 | "author": "KunihiroS", 41 | "license": "MIT", 42 | "repository": { 43 | "type": "git", 44 | "url": "git+https://github.com/KunihiroS/claude-code-mcp.git" 45 | }, 46 | "bugs": { 47 | "url": "https://github.com/KunihiroS/claude-code-mcp/issues" 48 | }, 49 | "homepage": "https://github.com/KunihiroS/claude-code-mcp#readme", 50 | "engines": { 51 | "node": ">=18" 52 | } 53 | } -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '9.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | 7 | importers: 8 | 9 | .: 10 | dependencies: 11 | '@modelcontextprotocol/sdk': 12 | specifier: ^1.0.0 13 | version: 1.11.0 14 | dotenv: 15 | specifier: ^16.4.5 16 | version: 16.5.0 17 | winston: 18 | specifier: ^3.13.0 19 | version: 3.17.0 20 | devDependencies: 21 | '@anthropic-ai/claude-code': 22 | specifier: ^0.2.103 23 | version: 0.2.103 24 | '@types/dotenv': 25 | specifier: ^8.2.0 26 | version: 8.2.3 27 | '@types/node': 28 | specifier: ^20.17.43 29 | version: 20.17.43 30 | typescript: 31 | specifier: ^4.9.5 32 | version: 4.9.5 33 | 34 | packages: 35 | 36 | '@anthropic-ai/claude-code@0.2.103': 37 | resolution: {integrity: sha512-xIQf2JyOiuOz6D4QEUVsFb00Wn6WfYHAGs+iB9trB7jfbxzctr9iYC2gRptSzzy7B8Y/MU8cpW8+lH5qjA7c+Q==} 38 | engines: {node: '>=18.0.0'} 39 | hasBin: true 40 | 41 | '@colors/colors@1.6.0': 42 | resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} 43 | engines: {node: '>=0.1.90'} 44 | 45 | '@dabh/diagnostics@2.0.3': 46 | resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} 47 | 48 | '@img/sharp-darwin-arm64@0.33.5': 49 | resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} 50 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 51 | cpu: [arm64] 52 | os: [darwin] 53 | 54 | '@img/sharp-libvips-darwin-arm64@1.0.4': 55 | resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} 56 | cpu: [arm64] 57 | os: [darwin] 58 | 59 | '@img/sharp-libvips-linux-arm@1.0.5': 60 | resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} 61 | cpu: [arm] 62 | os: [linux] 63 | 64 | '@img/sharp-libvips-linux-x64@1.0.4': 65 | resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} 66 | cpu: [x64] 67 | os: [linux] 68 | 69 | '@img/sharp-linux-arm@0.33.5': 70 | resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} 71 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 72 | cpu: [arm] 73 | os: [linux] 74 | 75 | '@img/sharp-linux-x64@0.33.5': 76 | resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} 77 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 78 | cpu: [x64] 79 | os: [linux] 80 | 81 | '@img/sharp-win32-x64@0.33.5': 82 | resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} 83 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 84 | cpu: [x64] 85 | os: [win32] 86 | 87 | '@modelcontextprotocol/sdk@1.11.0': 88 | resolution: {integrity: sha512-k/1pb70eD638anoi0e8wUGAlbMJXyvdV4p62Ko+EZ7eBe1xMx8Uhak1R5DgfoofsK5IBBnRwsYGTaLZl+6/+RQ==} 89 | engines: {node: '>=18'} 90 | 91 | '@types/dotenv@8.2.3': 92 | resolution: {integrity: sha512-g2FXjlDX/cYuc5CiQvyU/6kkbP1JtmGzh0obW50zD7OKeILVL0NSpPWLXVfqoAGQjom2/SLLx9zHq0KXvD6mbw==} 93 | deprecated: This is a stub types definition. dotenv provides its own type definitions, so you do not need this installed. 94 | 95 | '@types/node@20.17.43': 96 | resolution: {integrity: sha512-DnDEcDUnVAUYSa7U03QvrXbj1MZj00xoyi/a3lRGkR/c7BFUnqv+OY9EUphMqXUKdZJEOmuzu2mm+LmCisnPow==} 97 | 98 | '@types/triple-beam@1.3.5': 99 | resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==} 100 | 101 | accepts@2.0.0: 102 | resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} 103 | engines: {node: '>= 0.6'} 104 | 105 | async@3.2.6: 106 | resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} 107 | 108 | base64-js@1.5.1: 109 | resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} 110 | 111 | better-sqlite3@11.9.1: 112 | resolution: {integrity: sha512-Ba0KR+Fzxh2jDRhdg6TSH0SJGzb8C0aBY4hR8w8madIdIzzC6Y1+kx5qR6eS1Z+Gy20h6ZU28aeyg0z1VIrShQ==} 113 | 114 | bindings@1.5.0: 115 | resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} 116 | 117 | bl@4.1.0: 118 | resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} 119 | 120 | body-parser@2.2.0: 121 | resolution: {integrity: sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==} 122 | engines: {node: '>=18'} 123 | 124 | buffer@5.7.1: 125 | resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} 126 | 127 | bytes@3.1.2: 128 | resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} 129 | engines: {node: '>= 0.8'} 130 | 131 | call-bind-apply-helpers@1.0.2: 132 | resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} 133 | engines: {node: '>= 0.4'} 134 | 135 | call-bound@1.0.4: 136 | resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} 137 | engines: {node: '>= 0.4'} 138 | 139 | chownr@1.1.4: 140 | resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} 141 | 142 | color-convert@1.9.3: 143 | resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} 144 | 145 | color-name@1.1.3: 146 | resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} 147 | 148 | color-name@1.1.4: 149 | resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} 150 | 151 | color-string@1.9.1: 152 | resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} 153 | 154 | color@3.2.1: 155 | resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} 156 | 157 | colorspace@1.1.4: 158 | resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} 159 | 160 | content-disposition@1.0.0: 161 | resolution: {integrity: sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==} 162 | engines: {node: '>= 0.6'} 163 | 164 | content-type@1.0.5: 165 | resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} 166 | engines: {node: '>= 0.6'} 167 | 168 | cookie-signature@1.2.2: 169 | resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} 170 | engines: {node: '>=6.6.0'} 171 | 172 | cookie@0.7.2: 173 | resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} 174 | engines: {node: '>= 0.6'} 175 | 176 | cors@2.8.5: 177 | resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} 178 | engines: {node: '>= 0.10'} 179 | 180 | cross-spawn@7.0.6: 181 | resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} 182 | engines: {node: '>= 8'} 183 | 184 | debug@4.4.0: 185 | resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} 186 | engines: {node: '>=6.0'} 187 | peerDependencies: 188 | supports-color: '*' 189 | peerDependenciesMeta: 190 | supports-color: 191 | optional: true 192 | 193 | decompress-response@6.0.0: 194 | resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} 195 | engines: {node: '>=10'} 196 | 197 | deep-extend@0.6.0: 198 | resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} 199 | engines: {node: '>=4.0.0'} 200 | 201 | depd@2.0.0: 202 | resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} 203 | engines: {node: '>= 0.8'} 204 | 205 | detect-libc@2.0.4: 206 | resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==} 207 | engines: {node: '>=8'} 208 | 209 | dotenv@16.5.0: 210 | resolution: {integrity: sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==} 211 | engines: {node: '>=12'} 212 | 213 | dunder-proto@1.0.1: 214 | resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} 215 | engines: {node: '>= 0.4'} 216 | 217 | ee-first@1.1.1: 218 | resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} 219 | 220 | enabled@2.0.0: 221 | resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} 222 | 223 | encodeurl@2.0.0: 224 | resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} 225 | engines: {node: '>= 0.8'} 226 | 227 | end-of-stream@1.4.4: 228 | resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} 229 | 230 | es-define-property@1.0.1: 231 | resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} 232 | engines: {node: '>= 0.4'} 233 | 234 | es-errors@1.3.0: 235 | resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} 236 | engines: {node: '>= 0.4'} 237 | 238 | es-object-atoms@1.1.1: 239 | resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} 240 | engines: {node: '>= 0.4'} 241 | 242 | escape-html@1.0.3: 243 | resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} 244 | 245 | etag@1.8.1: 246 | resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} 247 | engines: {node: '>= 0.6'} 248 | 249 | eventsource-parser@3.0.1: 250 | resolution: {integrity: sha512-VARTJ9CYeuQYb0pZEPbzi740OWFgpHe7AYJ2WFZVnUDUQp5Dk2yJUgF36YsZ81cOyxT0QxmXD2EQpapAouzWVA==} 251 | engines: {node: '>=18.0.0'} 252 | 253 | eventsource@3.0.6: 254 | resolution: {integrity: sha512-l19WpE2m9hSuyP06+FbuUUf1G+R0SFLrtQfbRb9PRr+oimOfxQhgGCbVaXg5IvZyyTThJsxh6L/srkMiCeBPDA==} 255 | engines: {node: '>=18.0.0'} 256 | 257 | expand-template@2.0.3: 258 | resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} 259 | engines: {node: '>=6'} 260 | 261 | express-rate-limit@7.5.0: 262 | resolution: {integrity: sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==} 263 | engines: {node: '>= 16'} 264 | peerDependencies: 265 | express: ^4.11 || 5 || ^5.0.0-beta.1 266 | 267 | express@5.1.0: 268 | resolution: {integrity: sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==} 269 | engines: {node: '>= 18'} 270 | 271 | fecha@4.2.3: 272 | resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} 273 | 274 | file-uri-to-path@1.0.0: 275 | resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} 276 | 277 | finalhandler@2.1.0: 278 | resolution: {integrity: sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==} 279 | engines: {node: '>= 0.8'} 280 | 281 | fn.name@1.1.0: 282 | resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} 283 | 284 | forwarded@0.2.0: 285 | resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} 286 | engines: {node: '>= 0.6'} 287 | 288 | fresh@2.0.0: 289 | resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} 290 | engines: {node: '>= 0.8'} 291 | 292 | fs-constants@1.0.0: 293 | resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} 294 | 295 | function-bind@1.1.2: 296 | resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} 297 | 298 | get-intrinsic@1.3.0: 299 | resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} 300 | engines: {node: '>= 0.4'} 301 | 302 | get-proto@1.0.1: 303 | resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} 304 | engines: {node: '>= 0.4'} 305 | 306 | github-from-package@0.0.0: 307 | resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} 308 | 309 | gopd@1.2.0: 310 | resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} 311 | engines: {node: '>= 0.4'} 312 | 313 | has-symbols@1.1.0: 314 | resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} 315 | engines: {node: '>= 0.4'} 316 | 317 | hasown@2.0.2: 318 | resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} 319 | engines: {node: '>= 0.4'} 320 | 321 | http-errors@2.0.0: 322 | resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} 323 | engines: {node: '>= 0.8'} 324 | 325 | iconv-lite@0.6.3: 326 | resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} 327 | engines: {node: '>=0.10.0'} 328 | 329 | ieee754@1.2.1: 330 | resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} 331 | 332 | inherits@2.0.4: 333 | resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} 334 | 335 | ini@1.3.8: 336 | resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} 337 | 338 | ipaddr.js@1.9.1: 339 | resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} 340 | engines: {node: '>= 0.10'} 341 | 342 | is-arrayish@0.3.2: 343 | resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} 344 | 345 | is-promise@4.0.0: 346 | resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} 347 | 348 | is-stream@2.0.1: 349 | resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} 350 | engines: {node: '>=8'} 351 | 352 | isexe@2.0.0: 353 | resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} 354 | 355 | kuler@2.0.0: 356 | resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} 357 | 358 | logform@2.7.0: 359 | resolution: {integrity: sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==} 360 | engines: {node: '>= 12.0.0'} 361 | 362 | math-intrinsics@1.1.0: 363 | resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} 364 | engines: {node: '>= 0.4'} 365 | 366 | media-typer@1.1.0: 367 | resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} 368 | engines: {node: '>= 0.8'} 369 | 370 | merge-descriptors@2.0.0: 371 | resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} 372 | engines: {node: '>=18'} 373 | 374 | mime-db@1.54.0: 375 | resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} 376 | engines: {node: '>= 0.6'} 377 | 378 | mime-types@3.0.1: 379 | resolution: {integrity: sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==} 380 | engines: {node: '>= 0.6'} 381 | 382 | mimic-response@3.1.0: 383 | resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} 384 | engines: {node: '>=10'} 385 | 386 | minimist@1.2.8: 387 | resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} 388 | 389 | mkdirp-classic@0.5.3: 390 | resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} 391 | 392 | ms@2.1.3: 393 | resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} 394 | 395 | napi-build-utils@2.0.0: 396 | resolution: {integrity: sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==} 397 | 398 | negotiator@1.0.0: 399 | resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} 400 | engines: {node: '>= 0.6'} 401 | 402 | node-abi@3.75.0: 403 | resolution: {integrity: sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==} 404 | engines: {node: '>=10'} 405 | 406 | object-assign@4.1.1: 407 | resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} 408 | engines: {node: '>=0.10.0'} 409 | 410 | object-inspect@1.13.4: 411 | resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} 412 | engines: {node: '>= 0.4'} 413 | 414 | on-finished@2.4.1: 415 | resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} 416 | engines: {node: '>= 0.8'} 417 | 418 | once@1.4.0: 419 | resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} 420 | 421 | one-time@1.0.0: 422 | resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==} 423 | 424 | parseurl@1.3.3: 425 | resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} 426 | engines: {node: '>= 0.8'} 427 | 428 | path-key@3.1.1: 429 | resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} 430 | engines: {node: '>=8'} 431 | 432 | path-to-regexp@8.2.0: 433 | resolution: {integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==} 434 | engines: {node: '>=16'} 435 | 436 | pkce-challenge@5.0.0: 437 | resolution: {integrity: sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==} 438 | engines: {node: '>=16.20.0'} 439 | 440 | prebuild-install@7.1.3: 441 | resolution: {integrity: sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==} 442 | engines: {node: '>=10'} 443 | hasBin: true 444 | 445 | proxy-addr@2.0.7: 446 | resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} 447 | engines: {node: '>= 0.10'} 448 | 449 | pump@3.0.2: 450 | resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} 451 | 452 | qs@6.14.0: 453 | resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} 454 | engines: {node: '>=0.6'} 455 | 456 | range-parser@1.2.1: 457 | resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} 458 | engines: {node: '>= 0.6'} 459 | 460 | raw-body@3.0.0: 461 | resolution: {integrity: sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==} 462 | engines: {node: '>= 0.8'} 463 | 464 | rc@1.2.8: 465 | resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} 466 | hasBin: true 467 | 468 | readable-stream@3.6.2: 469 | resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} 470 | engines: {node: '>= 6'} 471 | 472 | router@2.2.0: 473 | resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} 474 | engines: {node: '>= 18'} 475 | 476 | safe-buffer@5.2.1: 477 | resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} 478 | 479 | safe-stable-stringify@2.5.0: 480 | resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} 481 | engines: {node: '>=10'} 482 | 483 | safer-buffer@2.1.2: 484 | resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} 485 | 486 | semver@7.7.1: 487 | resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} 488 | engines: {node: '>=10'} 489 | hasBin: true 490 | 491 | send@1.2.0: 492 | resolution: {integrity: sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==} 493 | engines: {node: '>= 18'} 494 | 495 | serve-static@2.2.0: 496 | resolution: {integrity: sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==} 497 | engines: {node: '>= 18'} 498 | 499 | setprototypeof@1.2.0: 500 | resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} 501 | 502 | shebang-command@2.0.0: 503 | resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} 504 | engines: {node: '>=8'} 505 | 506 | shebang-regex@3.0.0: 507 | resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} 508 | engines: {node: '>=8'} 509 | 510 | side-channel-list@1.0.0: 511 | resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} 512 | engines: {node: '>= 0.4'} 513 | 514 | side-channel-map@1.0.1: 515 | resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} 516 | engines: {node: '>= 0.4'} 517 | 518 | side-channel-weakmap@1.0.2: 519 | resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} 520 | engines: {node: '>= 0.4'} 521 | 522 | side-channel@1.1.0: 523 | resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} 524 | engines: {node: '>= 0.4'} 525 | 526 | simple-concat@1.0.1: 527 | resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} 528 | 529 | simple-get@4.0.1: 530 | resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} 531 | 532 | simple-swizzle@0.2.2: 533 | resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} 534 | 535 | stack-trace@0.0.10: 536 | resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} 537 | 538 | statuses@2.0.1: 539 | resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} 540 | engines: {node: '>= 0.8'} 541 | 542 | string_decoder@1.3.0: 543 | resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} 544 | 545 | strip-json-comments@2.0.1: 546 | resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} 547 | engines: {node: '>=0.10.0'} 548 | 549 | tar-fs@2.1.2: 550 | resolution: {integrity: sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==} 551 | 552 | tar-stream@2.2.0: 553 | resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} 554 | engines: {node: '>=6'} 555 | 556 | text-hex@1.0.0: 557 | resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} 558 | 559 | toidentifier@1.0.1: 560 | resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} 561 | engines: {node: '>=0.6'} 562 | 563 | triple-beam@1.4.1: 564 | resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} 565 | engines: {node: '>= 14.0.0'} 566 | 567 | tunnel-agent@0.6.0: 568 | resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} 569 | 570 | type-is@2.0.1: 571 | resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==} 572 | engines: {node: '>= 0.6'} 573 | 574 | typescript@4.9.5: 575 | resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} 576 | engines: {node: '>=4.2.0'} 577 | hasBin: true 578 | 579 | undici-types@6.19.8: 580 | resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} 581 | 582 | unpipe@1.0.0: 583 | resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} 584 | engines: {node: '>= 0.8'} 585 | 586 | util-deprecate@1.0.2: 587 | resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} 588 | 589 | vary@1.1.2: 590 | resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} 591 | engines: {node: '>= 0.8'} 592 | 593 | which@2.0.2: 594 | resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} 595 | engines: {node: '>= 8'} 596 | hasBin: true 597 | 598 | winston-transport@4.9.0: 599 | resolution: {integrity: sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==} 600 | engines: {node: '>= 12.0.0'} 601 | 602 | winston@3.17.0: 603 | resolution: {integrity: sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==} 604 | engines: {node: '>= 12.0.0'} 605 | 606 | wrappy@1.0.2: 607 | resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} 608 | 609 | zod-to-json-schema@3.24.5: 610 | resolution: {integrity: sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==} 611 | peerDependencies: 612 | zod: ^3.24.1 613 | 614 | zod@3.24.4: 615 | resolution: {integrity: sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==} 616 | 617 | snapshots: 618 | 619 | '@anthropic-ai/claude-code@0.2.103': 620 | dependencies: 621 | better-sqlite3: 11.9.1 622 | optionalDependencies: 623 | '@img/sharp-darwin-arm64': 0.33.5 624 | '@img/sharp-linux-arm': 0.33.5 625 | '@img/sharp-linux-x64': 0.33.5 626 | '@img/sharp-win32-x64': 0.33.5 627 | 628 | '@colors/colors@1.6.0': {} 629 | 630 | '@dabh/diagnostics@2.0.3': 631 | dependencies: 632 | colorspace: 1.1.4 633 | enabled: 2.0.0 634 | kuler: 2.0.0 635 | 636 | '@img/sharp-darwin-arm64@0.33.5': 637 | optionalDependencies: 638 | '@img/sharp-libvips-darwin-arm64': 1.0.4 639 | optional: true 640 | 641 | '@img/sharp-libvips-darwin-arm64@1.0.4': 642 | optional: true 643 | 644 | '@img/sharp-libvips-linux-arm@1.0.5': 645 | optional: true 646 | 647 | '@img/sharp-libvips-linux-x64@1.0.4': 648 | optional: true 649 | 650 | '@img/sharp-linux-arm@0.33.5': 651 | optionalDependencies: 652 | '@img/sharp-libvips-linux-arm': 1.0.5 653 | optional: true 654 | 655 | '@img/sharp-linux-x64@0.33.5': 656 | optionalDependencies: 657 | '@img/sharp-libvips-linux-x64': 1.0.4 658 | optional: true 659 | 660 | '@img/sharp-win32-x64@0.33.5': 661 | optional: true 662 | 663 | '@modelcontextprotocol/sdk@1.11.0': 664 | dependencies: 665 | content-type: 1.0.5 666 | cors: 2.8.5 667 | cross-spawn: 7.0.6 668 | eventsource: 3.0.6 669 | express: 5.1.0 670 | express-rate-limit: 7.5.0(express@5.1.0) 671 | pkce-challenge: 5.0.0 672 | raw-body: 3.0.0 673 | zod: 3.24.4 674 | zod-to-json-schema: 3.24.5(zod@3.24.4) 675 | transitivePeerDependencies: 676 | - supports-color 677 | 678 | '@types/dotenv@8.2.3': 679 | dependencies: 680 | dotenv: 16.5.0 681 | 682 | '@types/node@20.17.43': 683 | dependencies: 684 | undici-types: 6.19.8 685 | 686 | '@types/triple-beam@1.3.5': {} 687 | 688 | accepts@2.0.0: 689 | dependencies: 690 | mime-types: 3.0.1 691 | negotiator: 1.0.0 692 | 693 | async@3.2.6: {} 694 | 695 | base64-js@1.5.1: {} 696 | 697 | better-sqlite3@11.9.1: 698 | dependencies: 699 | bindings: 1.5.0 700 | prebuild-install: 7.1.3 701 | 702 | bindings@1.5.0: 703 | dependencies: 704 | file-uri-to-path: 1.0.0 705 | 706 | bl@4.1.0: 707 | dependencies: 708 | buffer: 5.7.1 709 | inherits: 2.0.4 710 | readable-stream: 3.6.2 711 | 712 | body-parser@2.2.0: 713 | dependencies: 714 | bytes: 3.1.2 715 | content-type: 1.0.5 716 | debug: 4.4.0 717 | http-errors: 2.0.0 718 | iconv-lite: 0.6.3 719 | on-finished: 2.4.1 720 | qs: 6.14.0 721 | raw-body: 3.0.0 722 | type-is: 2.0.1 723 | transitivePeerDependencies: 724 | - supports-color 725 | 726 | buffer@5.7.1: 727 | dependencies: 728 | base64-js: 1.5.1 729 | ieee754: 1.2.1 730 | 731 | bytes@3.1.2: {} 732 | 733 | call-bind-apply-helpers@1.0.2: 734 | dependencies: 735 | es-errors: 1.3.0 736 | function-bind: 1.1.2 737 | 738 | call-bound@1.0.4: 739 | dependencies: 740 | call-bind-apply-helpers: 1.0.2 741 | get-intrinsic: 1.3.0 742 | 743 | chownr@1.1.4: {} 744 | 745 | color-convert@1.9.3: 746 | dependencies: 747 | color-name: 1.1.3 748 | 749 | color-name@1.1.3: {} 750 | 751 | color-name@1.1.4: {} 752 | 753 | color-string@1.9.1: 754 | dependencies: 755 | color-name: 1.1.4 756 | simple-swizzle: 0.2.2 757 | 758 | color@3.2.1: 759 | dependencies: 760 | color-convert: 1.9.3 761 | color-string: 1.9.1 762 | 763 | colorspace@1.1.4: 764 | dependencies: 765 | color: 3.2.1 766 | text-hex: 1.0.0 767 | 768 | content-disposition@1.0.0: 769 | dependencies: 770 | safe-buffer: 5.2.1 771 | 772 | content-type@1.0.5: {} 773 | 774 | cookie-signature@1.2.2: {} 775 | 776 | cookie@0.7.2: {} 777 | 778 | cors@2.8.5: 779 | dependencies: 780 | object-assign: 4.1.1 781 | vary: 1.1.2 782 | 783 | cross-spawn@7.0.6: 784 | dependencies: 785 | path-key: 3.1.1 786 | shebang-command: 2.0.0 787 | which: 2.0.2 788 | 789 | debug@4.4.0: 790 | dependencies: 791 | ms: 2.1.3 792 | 793 | decompress-response@6.0.0: 794 | dependencies: 795 | mimic-response: 3.1.0 796 | 797 | deep-extend@0.6.0: {} 798 | 799 | depd@2.0.0: {} 800 | 801 | detect-libc@2.0.4: {} 802 | 803 | dotenv@16.5.0: {} 804 | 805 | dunder-proto@1.0.1: 806 | dependencies: 807 | call-bind-apply-helpers: 1.0.2 808 | es-errors: 1.3.0 809 | gopd: 1.2.0 810 | 811 | ee-first@1.1.1: {} 812 | 813 | enabled@2.0.0: {} 814 | 815 | encodeurl@2.0.0: {} 816 | 817 | end-of-stream@1.4.4: 818 | dependencies: 819 | once: 1.4.0 820 | 821 | es-define-property@1.0.1: {} 822 | 823 | es-errors@1.3.0: {} 824 | 825 | es-object-atoms@1.1.1: 826 | dependencies: 827 | es-errors: 1.3.0 828 | 829 | escape-html@1.0.3: {} 830 | 831 | etag@1.8.1: {} 832 | 833 | eventsource-parser@3.0.1: {} 834 | 835 | eventsource@3.0.6: 836 | dependencies: 837 | eventsource-parser: 3.0.1 838 | 839 | expand-template@2.0.3: {} 840 | 841 | express-rate-limit@7.5.0(express@5.1.0): 842 | dependencies: 843 | express: 5.1.0 844 | 845 | express@5.1.0: 846 | dependencies: 847 | accepts: 2.0.0 848 | body-parser: 2.2.0 849 | content-disposition: 1.0.0 850 | content-type: 1.0.5 851 | cookie: 0.7.2 852 | cookie-signature: 1.2.2 853 | debug: 4.4.0 854 | encodeurl: 2.0.0 855 | escape-html: 1.0.3 856 | etag: 1.8.1 857 | finalhandler: 2.1.0 858 | fresh: 2.0.0 859 | http-errors: 2.0.0 860 | merge-descriptors: 2.0.0 861 | mime-types: 3.0.1 862 | on-finished: 2.4.1 863 | once: 1.4.0 864 | parseurl: 1.3.3 865 | proxy-addr: 2.0.7 866 | qs: 6.14.0 867 | range-parser: 1.2.1 868 | router: 2.2.0 869 | send: 1.2.0 870 | serve-static: 2.2.0 871 | statuses: 2.0.1 872 | type-is: 2.0.1 873 | vary: 1.1.2 874 | transitivePeerDependencies: 875 | - supports-color 876 | 877 | fecha@4.2.3: {} 878 | 879 | file-uri-to-path@1.0.0: {} 880 | 881 | finalhandler@2.1.0: 882 | dependencies: 883 | debug: 4.4.0 884 | encodeurl: 2.0.0 885 | escape-html: 1.0.3 886 | on-finished: 2.4.1 887 | parseurl: 1.3.3 888 | statuses: 2.0.1 889 | transitivePeerDependencies: 890 | - supports-color 891 | 892 | fn.name@1.1.0: {} 893 | 894 | forwarded@0.2.0: {} 895 | 896 | fresh@2.0.0: {} 897 | 898 | fs-constants@1.0.0: {} 899 | 900 | function-bind@1.1.2: {} 901 | 902 | get-intrinsic@1.3.0: 903 | dependencies: 904 | call-bind-apply-helpers: 1.0.2 905 | es-define-property: 1.0.1 906 | es-errors: 1.3.0 907 | es-object-atoms: 1.1.1 908 | function-bind: 1.1.2 909 | get-proto: 1.0.1 910 | gopd: 1.2.0 911 | has-symbols: 1.1.0 912 | hasown: 2.0.2 913 | math-intrinsics: 1.1.0 914 | 915 | get-proto@1.0.1: 916 | dependencies: 917 | dunder-proto: 1.0.1 918 | es-object-atoms: 1.1.1 919 | 920 | github-from-package@0.0.0: {} 921 | 922 | gopd@1.2.0: {} 923 | 924 | has-symbols@1.1.0: {} 925 | 926 | hasown@2.0.2: 927 | dependencies: 928 | function-bind: 1.1.2 929 | 930 | http-errors@2.0.0: 931 | dependencies: 932 | depd: 2.0.0 933 | inherits: 2.0.4 934 | setprototypeof: 1.2.0 935 | statuses: 2.0.1 936 | toidentifier: 1.0.1 937 | 938 | iconv-lite@0.6.3: 939 | dependencies: 940 | safer-buffer: 2.1.2 941 | 942 | ieee754@1.2.1: {} 943 | 944 | inherits@2.0.4: {} 945 | 946 | ini@1.3.8: {} 947 | 948 | ipaddr.js@1.9.1: {} 949 | 950 | is-arrayish@0.3.2: {} 951 | 952 | is-promise@4.0.0: {} 953 | 954 | is-stream@2.0.1: {} 955 | 956 | isexe@2.0.0: {} 957 | 958 | kuler@2.0.0: {} 959 | 960 | logform@2.7.0: 961 | dependencies: 962 | '@colors/colors': 1.6.0 963 | '@types/triple-beam': 1.3.5 964 | fecha: 4.2.3 965 | ms: 2.1.3 966 | safe-stable-stringify: 2.5.0 967 | triple-beam: 1.4.1 968 | 969 | math-intrinsics@1.1.0: {} 970 | 971 | media-typer@1.1.0: {} 972 | 973 | merge-descriptors@2.0.0: {} 974 | 975 | mime-db@1.54.0: {} 976 | 977 | mime-types@3.0.1: 978 | dependencies: 979 | mime-db: 1.54.0 980 | 981 | mimic-response@3.1.0: {} 982 | 983 | minimist@1.2.8: {} 984 | 985 | mkdirp-classic@0.5.3: {} 986 | 987 | ms@2.1.3: {} 988 | 989 | napi-build-utils@2.0.0: {} 990 | 991 | negotiator@1.0.0: {} 992 | 993 | node-abi@3.75.0: 994 | dependencies: 995 | semver: 7.7.1 996 | 997 | object-assign@4.1.1: {} 998 | 999 | object-inspect@1.13.4: {} 1000 | 1001 | on-finished@2.4.1: 1002 | dependencies: 1003 | ee-first: 1.1.1 1004 | 1005 | once@1.4.0: 1006 | dependencies: 1007 | wrappy: 1.0.2 1008 | 1009 | one-time@1.0.0: 1010 | dependencies: 1011 | fn.name: 1.1.0 1012 | 1013 | parseurl@1.3.3: {} 1014 | 1015 | path-key@3.1.1: {} 1016 | 1017 | path-to-regexp@8.2.0: {} 1018 | 1019 | pkce-challenge@5.0.0: {} 1020 | 1021 | prebuild-install@7.1.3: 1022 | dependencies: 1023 | detect-libc: 2.0.4 1024 | expand-template: 2.0.3 1025 | github-from-package: 0.0.0 1026 | minimist: 1.2.8 1027 | mkdirp-classic: 0.5.3 1028 | napi-build-utils: 2.0.0 1029 | node-abi: 3.75.0 1030 | pump: 3.0.2 1031 | rc: 1.2.8 1032 | simple-get: 4.0.1 1033 | tar-fs: 2.1.2 1034 | tunnel-agent: 0.6.0 1035 | 1036 | proxy-addr@2.0.7: 1037 | dependencies: 1038 | forwarded: 0.2.0 1039 | ipaddr.js: 1.9.1 1040 | 1041 | pump@3.0.2: 1042 | dependencies: 1043 | end-of-stream: 1.4.4 1044 | once: 1.4.0 1045 | 1046 | qs@6.14.0: 1047 | dependencies: 1048 | side-channel: 1.1.0 1049 | 1050 | range-parser@1.2.1: {} 1051 | 1052 | raw-body@3.0.0: 1053 | dependencies: 1054 | bytes: 3.1.2 1055 | http-errors: 2.0.0 1056 | iconv-lite: 0.6.3 1057 | unpipe: 1.0.0 1058 | 1059 | rc@1.2.8: 1060 | dependencies: 1061 | deep-extend: 0.6.0 1062 | ini: 1.3.8 1063 | minimist: 1.2.8 1064 | strip-json-comments: 2.0.1 1065 | 1066 | readable-stream@3.6.2: 1067 | dependencies: 1068 | inherits: 2.0.4 1069 | string_decoder: 1.3.0 1070 | util-deprecate: 1.0.2 1071 | 1072 | router@2.2.0: 1073 | dependencies: 1074 | debug: 4.4.0 1075 | depd: 2.0.0 1076 | is-promise: 4.0.0 1077 | parseurl: 1.3.3 1078 | path-to-regexp: 8.2.0 1079 | transitivePeerDependencies: 1080 | - supports-color 1081 | 1082 | safe-buffer@5.2.1: {} 1083 | 1084 | safe-stable-stringify@2.5.0: {} 1085 | 1086 | safer-buffer@2.1.2: {} 1087 | 1088 | semver@7.7.1: {} 1089 | 1090 | send@1.2.0: 1091 | dependencies: 1092 | debug: 4.4.0 1093 | encodeurl: 2.0.0 1094 | escape-html: 1.0.3 1095 | etag: 1.8.1 1096 | fresh: 2.0.0 1097 | http-errors: 2.0.0 1098 | mime-types: 3.0.1 1099 | ms: 2.1.3 1100 | on-finished: 2.4.1 1101 | range-parser: 1.2.1 1102 | statuses: 2.0.1 1103 | transitivePeerDependencies: 1104 | - supports-color 1105 | 1106 | serve-static@2.2.0: 1107 | dependencies: 1108 | encodeurl: 2.0.0 1109 | escape-html: 1.0.3 1110 | parseurl: 1.3.3 1111 | send: 1.2.0 1112 | transitivePeerDependencies: 1113 | - supports-color 1114 | 1115 | setprototypeof@1.2.0: {} 1116 | 1117 | shebang-command@2.0.0: 1118 | dependencies: 1119 | shebang-regex: 3.0.0 1120 | 1121 | shebang-regex@3.0.0: {} 1122 | 1123 | side-channel-list@1.0.0: 1124 | dependencies: 1125 | es-errors: 1.3.0 1126 | object-inspect: 1.13.4 1127 | 1128 | side-channel-map@1.0.1: 1129 | dependencies: 1130 | call-bound: 1.0.4 1131 | es-errors: 1.3.0 1132 | get-intrinsic: 1.3.0 1133 | object-inspect: 1.13.4 1134 | 1135 | side-channel-weakmap@1.0.2: 1136 | dependencies: 1137 | call-bound: 1.0.4 1138 | es-errors: 1.3.0 1139 | get-intrinsic: 1.3.0 1140 | object-inspect: 1.13.4 1141 | side-channel-map: 1.0.1 1142 | 1143 | side-channel@1.1.0: 1144 | dependencies: 1145 | es-errors: 1.3.0 1146 | object-inspect: 1.13.4 1147 | side-channel-list: 1.0.0 1148 | side-channel-map: 1.0.1 1149 | side-channel-weakmap: 1.0.2 1150 | 1151 | simple-concat@1.0.1: {} 1152 | 1153 | simple-get@4.0.1: 1154 | dependencies: 1155 | decompress-response: 6.0.0 1156 | once: 1.4.0 1157 | simple-concat: 1.0.1 1158 | 1159 | simple-swizzle@0.2.2: 1160 | dependencies: 1161 | is-arrayish: 0.3.2 1162 | 1163 | stack-trace@0.0.10: {} 1164 | 1165 | statuses@2.0.1: {} 1166 | 1167 | string_decoder@1.3.0: 1168 | dependencies: 1169 | safe-buffer: 5.2.1 1170 | 1171 | strip-json-comments@2.0.1: {} 1172 | 1173 | tar-fs@2.1.2: 1174 | dependencies: 1175 | chownr: 1.1.4 1176 | mkdirp-classic: 0.5.3 1177 | pump: 3.0.2 1178 | tar-stream: 2.2.0 1179 | 1180 | tar-stream@2.2.0: 1181 | dependencies: 1182 | bl: 4.1.0 1183 | end-of-stream: 1.4.4 1184 | fs-constants: 1.0.0 1185 | inherits: 2.0.4 1186 | readable-stream: 3.6.2 1187 | 1188 | text-hex@1.0.0: {} 1189 | 1190 | toidentifier@1.0.1: {} 1191 | 1192 | triple-beam@1.4.1: {} 1193 | 1194 | tunnel-agent@0.6.0: 1195 | dependencies: 1196 | safe-buffer: 5.2.1 1197 | 1198 | type-is@2.0.1: 1199 | dependencies: 1200 | content-type: 1.0.5 1201 | media-typer: 1.1.0 1202 | mime-types: 3.0.1 1203 | 1204 | typescript@4.9.5: {} 1205 | 1206 | undici-types@6.19.8: {} 1207 | 1208 | unpipe@1.0.0: {} 1209 | 1210 | util-deprecate@1.0.2: {} 1211 | 1212 | vary@1.1.2: {} 1213 | 1214 | which@2.0.2: 1215 | dependencies: 1216 | isexe: 2.0.0 1217 | 1218 | winston-transport@4.9.0: 1219 | dependencies: 1220 | logform: 2.7.0 1221 | readable-stream: 3.6.2 1222 | triple-beam: 1.4.1 1223 | 1224 | winston@3.17.0: 1225 | dependencies: 1226 | '@colors/colors': 1.6.0 1227 | '@dabh/diagnostics': 2.0.3 1228 | async: 3.2.6 1229 | is-stream: 2.0.1 1230 | logform: 2.7.0 1231 | one-time: 1.0.0 1232 | readable-stream: 3.6.2 1233 | safe-stable-stringify: 2.5.0 1234 | stack-trace: 0.0.10 1235 | triple-beam: 1.4.1 1236 | winston-transport: 4.9.0 1237 | 1238 | wrappy@1.0.2: {} 1239 | 1240 | zod-to-json-schema@3.24.5(zod@3.24.4): 1241 | dependencies: 1242 | zod: 3.24.4 1243 | 1244 | zod@3.24.4: {} 1245 | --------------------------------------------------------------------------------