Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3937c3bdba |
@@ -28179,7 +28179,7 @@ var declare = ark.declare;
|
|||||||
|
|
||||||
// agents/claude.ts
|
// agents/claude.ts
|
||||||
import { execSync } from "node:child_process";
|
import { execSync } from "node:child_process";
|
||||||
import { createWriteStream as createWriteStream2, existsSync as existsSync2, rmSync as rmSync2 } from "node:fs";
|
import { createWriteStream as createWriteStream2, existsSync as existsSync3, rmSync as rmSync2 } from "node:fs";
|
||||||
import { mkdtemp } from "node:fs/promises";
|
import { mkdtemp } from "node:fs/promises";
|
||||||
import { tmpdir } from "node:os";
|
import { tmpdir } from "node:os";
|
||||||
import { join as join5 } from "node:path";
|
import { join as join5 } from "node:path";
|
||||||
@@ -40481,7 +40481,7 @@ function query({
|
|||||||
// package.json
|
// package.json
|
||||||
var package_default = {
|
var package_default = {
|
||||||
name: "@pullfrog/action",
|
name: "@pullfrog/action",
|
||||||
version: "0.0.85",
|
version: "0.0.86",
|
||||||
type: "module",
|
type: "module",
|
||||||
files: [
|
files: [
|
||||||
"index.js",
|
"index.js",
|
||||||
@@ -40749,6 +40749,10 @@ var log = {
|
|||||||
endGroup: endGroup2
|
endGroup: endGroup2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// mcp/config.ts
|
||||||
|
import { existsSync as existsSync2, readdirSync as readdirSync2 } from "node:fs";
|
||||||
|
import { dirname as dirname3 } from "node:path";
|
||||||
|
|
||||||
// node_modules/.pnpm/@ark+fs@0.53.0/node_modules/@ark/fs/out/caller.js
|
// node_modules/.pnpm/@ark+fs@0.53.0/node_modules/@ark/fs/out/caller.js
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import * as process2 from "node:process";
|
import * as process2 from "node:process";
|
||||||
@@ -41069,6 +41073,21 @@ function createMcpConfigs(githubInstallationToken) {
|
|||||||
const repoContext = parseRepoContext();
|
const repoContext = parseRepoContext();
|
||||||
const githubRepository = `${repoContext.owner}/${repoContext.name}`;
|
const githubRepository = `${repoContext.owner}/${repoContext.name}`;
|
||||||
const serverPath = process.env.GITHUB_ACTION_PATH ? `${process.env.GITHUB_ACTION_PATH}/mcp-server.js` : fromHere("server.ts");
|
const serverPath = process.env.GITHUB_ACTION_PATH ? `${process.env.GITHUB_ACTION_PATH}/mcp-server.js` : fromHere("server.ts");
|
||||||
|
log.info(`MCP Server Path: ${serverPath}`);
|
||||||
|
const pathExists = existsSync2(serverPath);
|
||||||
|
log.info(`MCP Server Path exists: ${pathExists}`);
|
||||||
|
if (!pathExists) {
|
||||||
|
const dir = dirname3(serverPath);
|
||||||
|
log.info(`Directory: ${dir}`);
|
||||||
|
try {
|
||||||
|
const files = readdirSync2(dir);
|
||||||
|
log.info(`Files in directory: ${files.join(", ")}`);
|
||||||
|
} catch (error2) {
|
||||||
|
log.warning(
|
||||||
|
`Failed to read directory: ${error2 instanceof Error ? error2.message : String(error2)}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
[ghPullfrogMcpName]: {
|
[ghPullfrogMcpName]: {
|
||||||
command: "node",
|
command: "node",
|
||||||
@@ -41167,7 +41186,7 @@ var claude = {
|
|||||||
execSync(`tar -xzf "${tarballPath}" -C "${tempDir}"`, { stdio: "pipe" });
|
execSync(`tar -xzf "${tarballPath}" -C "${tempDir}"`, { stdio: "pipe" });
|
||||||
const extractedDir = join5(tempDir, "package");
|
const extractedDir = join5(tempDir, "package");
|
||||||
const cliPath = join5(extractedDir, "cli.js");
|
const cliPath = join5(extractedDir, "cli.js");
|
||||||
if (!existsSync2(cliPath)) {
|
if (!existsSync3(cliPath)) {
|
||||||
throw new Error(`cli.js not found in extracted package at ${cliPath}`);
|
throw new Error(`cli.js not found in extracted package at ${cliPath}`);
|
||||||
}
|
}
|
||||||
cachedCliPath = cliPath;
|
cachedCliPath = cliPath;
|
||||||
|
|||||||
@@ -2,8 +2,11 @@
|
|||||||
* Simple MCP configuration helper for adding our minimal GitHub comment server
|
* Simple MCP configuration helper for adding our minimal GitHub comment server
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { existsSync, readdirSync } from "node:fs";
|
||||||
|
import { dirname } from "node:path";
|
||||||
import type { McpServerConfig } from "@anthropic-ai/claude-agent-sdk";
|
import type { McpServerConfig } from "@anthropic-ai/claude-agent-sdk";
|
||||||
import { fromHere } from "@ark/fs";
|
import { fromHere } from "@ark/fs";
|
||||||
|
import { log } from "../utils/cli.ts";
|
||||||
import { parseRepoContext } from "../utils/github.ts";
|
import { parseRepoContext } from "../utils/github.ts";
|
||||||
|
|
||||||
export const ghPullfrogMcpName = "gh-pullfrog";
|
export const ghPullfrogMcpName = "gh-pullfrog";
|
||||||
@@ -20,6 +23,24 @@ export function createMcpConfigs(githubInstallationToken: string): McpConfigs {
|
|||||||
? `${process.env.GITHUB_ACTION_PATH}/mcp-server.js`
|
? `${process.env.GITHUB_ACTION_PATH}/mcp-server.js`
|
||||||
: fromHere("server.ts");
|
: fromHere("server.ts");
|
||||||
|
|
||||||
|
// Debug: Log server path and check if it exists
|
||||||
|
log.info(`MCP Server Path: ${serverPath}`);
|
||||||
|
const pathExists = existsSync(serverPath);
|
||||||
|
log.info(`MCP Server Path exists: ${pathExists}`);
|
||||||
|
|
||||||
|
if (!pathExists) {
|
||||||
|
const dir = dirname(serverPath);
|
||||||
|
log.info(`Directory: ${dir}`);
|
||||||
|
try {
|
||||||
|
const files = readdirSync(dir);
|
||||||
|
log.info(`Files in directory: ${files.join(", ")}`);
|
||||||
|
} catch (error) {
|
||||||
|
log.warning(
|
||||||
|
`Failed to read directory: ${error instanceof Error ? error.message : String(error)}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
[ghPullfrogMcpName]: {
|
[ghPullfrogMcpName]: {
|
||||||
command: "node",
|
command: "node",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pullfrog/action",
|
"name": "@pullfrog/action",
|
||||||
"version": "0.0.85",
|
"version": "0.0.86",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user