From 2296060d0451cece802a174757fe073e872604d4 Mon Sep 17 00:00:00 2001 From: David Blass Date: Mon, 13 Oct 2025 13:44:29 -0400 Subject: [PATCH] await top-level runServer --- mcp/config.ts | 7 +++++++ mcp/server.ts | 10 +--------- package.json | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/mcp/config.ts b/mcp/config.ts index 141d68f..09542ed 100644 --- a/mcp/config.ts +++ b/mcp/config.ts @@ -3,6 +3,13 @@ */ const actionPath = process.env.GITHUB_ACTION_PATH || process.cwd(); +// import { dirname } from "node:path"; +// import { fileURLToPath } from "node:url"; + +// const __filename = fileURLToPath(import.meta.url); +// const __dirname = dirname(__filename); +// const actionPath = dirname(__dirname); + export function createMcpConfig(githubInstallationToken: string) { const githubRepository = process.env.GITHUB_REPOSITORY; if (!githubRepository) { diff --git a/mcp/server.ts b/mcp/server.ts index 1eb28fa..dea277f 100644 --- a/mcp/server.ts +++ b/mcp/server.ts @@ -6,7 +6,6 @@ import { Octokit } from "@octokit/rest"; import { type } from "arktype"; import { z } from "zod"; import { resolveRepoContext } from "../utils/repo-context.ts"; -import { writeFileSync } from "fs"; const server = new McpServer({ name: "Minimal GitHub Issue Comment Server", @@ -93,11 +92,4 @@ async function runServer() { }); } -runServer().catch((error) => { - // Write error to file for GitHub Actions visibility - try { - writeFileSync('/tmp/mcp-error.log', `${new Date().toISOString()} MCP Server Error: ${error.message}\nStack: ${error.stack}\n`, { flag: 'a' }); - } catch {} - console.error('MCP Server Error:', error); - process.exit(1); -}); +await runServer(); diff --git a/package.json b/package.json index 17f5ee8..a2affc9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pullfrog/action", - "version": "0.0.24", + "version": "0.0.25", "type": "module", "files": [ "index.js",