diff --git a/README.md b/README.md index 11666bb..9175aae 100644 --- a/README.md +++ b/README.md @@ -40,14 +40,14 @@ This will show the available commands and options. The task manager supports multiple LLM providers for generating project plans. You can configure one or more of the following environment variables depending on which providers you want to use: - `OPENAI_API_KEY`: Required for using OpenAI models (e.g., GPT-4) -- `GOOGLE_API_KEY`: Required for using Google's Gemini models +- `GEMINI_API_KEY`: Required for using Google's Gemini models - `DEEPSEEK_API_KEY`: Required for using Deepseek models To generate project plans using the CLI, set these environment variables in your shell: ```bash export OPENAI_API_KEY="your-api-key" -export GOOGLE_API_KEY="your-api-key" +export GEMINI_API_KEY="your-api-key" export DEEPSEEK_API_KEY="your-api-key" ``` @@ -61,7 +61,7 @@ Or you can include them in your MCP client configuration to generate project pla "args": ["-y", "taskqueue-mcp"], "env": { "OPENAI_API_KEY": "your-api-key", - "GOOGLE_API_KEY": "your-api-key", + "GEMINI_API_KEY": "your-api-key", "DEEPSEEK_API_KEY": "your-api-key" } } diff --git a/index.ts b/index.ts index 7ff9b79..af1000e 100644 --- a/index.ts +++ b/index.ts @@ -10,7 +10,7 @@ import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprot const server = new Server( { name: "task-manager-server", - version: "1.3.3" + version: "1.3.4" }, { capabilities: { diff --git a/package-lock.json b/package-lock.json index fc7fccd..7b1fbbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "taskqueue-mcp", - "version": "1.3.3", + "version": "1.3.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "taskqueue-mcp", - "version": "1.3.3", + "version": "1.3.4", "license": "MIT", "dependencies": { "@ai-sdk/deepseek": "^0.2.2", diff --git a/package.json b/package.json index 54eac33..9cbf84d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "taskqueue-mcp", - "version": "1.3.3", + "version": "1.3.4", "description": "Task Queue MCP Server", "author": "Christopher C. Smith (christopher.smith@promptlytechnologies.com)", "main": "dist/index.js", diff --git a/src/client/cli.ts b/src/client/cli.ts index 9fc125c..dac7535 100644 --- a/src/client/cli.ts +++ b/src/client/cli.ts @@ -16,7 +16,7 @@ const program = new Command(); program .name("taskqueue") .description("CLI for the Task Manager MCP Server") - .version("1.3.3") + .version("1.3.4") .option( '-f, --file-path ', 'Specify the path to the tasks JSON file. Overrides TASK_MANAGER_FILE_PATH env var.' diff --git a/tests/integration/TaskManager.integration.test.ts b/tests/integration/TaskManager.integration.test.ts index 85700e6..3f9f462 100644 --- a/tests/integration/TaskManager.integration.test.ts +++ b/tests/integration/TaskManager.integration.test.ts @@ -504,7 +504,7 @@ describe('TaskManager Integration', () => { // --- NEW API TEST --- // Skip this test by default, as it requires live API keys and makes external calls. - // Remove '.skip' and ensure OPENAI_API_KEY, GOOGLE_API_KEY, DEEPSEEK_API_KEY are in .env to run. + // Remove '.skip' and ensure OPENAI_API_KEY, GEMINI_API_KEY, DEEPSEEK_API_KEY are in .env to run. it.skip("should generate a project plan using live APIs", async () => { const testPrompt = "Create a plan for a simple web server using Node.js and Express."; const attachments: string[] = []; // Add mock attachment content if needed @@ -546,7 +546,7 @@ describe('TaskManager Integration', () => { } // --- Test Google --- - if (process.env.GOOGLE_API_KEY) { + if (process.env.GEMINI_API_KEY) { console.log("Testing Google Gemini API..."); try { const googleResult = await server.generateProjectPlan({ @@ -578,7 +578,7 @@ describe('TaskManager Integration', () => { expect(error).toBeNull(); } } else { - console.warn("Skipping Google test: GOOGLE_API_KEY not found in environment."); + console.warn("Skipping Google test: GEMINI_API_KEY not found in environment."); } // --- Test DeepSeek --- diff --git a/tests/integration/cli.integration.test.ts b/tests/integration/cli.integration.test.ts index df9b3fb..083d4e6 100644 --- a/tests/integration/cli.integration.test.ts +++ b/tests/integration/cli.integration.test.ts @@ -140,13 +140,13 @@ describe("CLI Integration Tests", () => { beforeEach(() => { // Set mock API keys for testing process.env.OPENAI_API_KEY = 'test-key'; - process.env.GOOGLE_API_KEY = 'test-key'; + process.env.GEMINI_API_KEY = 'test-key'; process.env.DEEPSEEK_API_KEY = 'test-key'; }); afterEach(() => { delete process.env.OPENAI_API_KEY; - delete process.env.GOOGLE_API_KEY; + delete process.env.GEMINI_API_KEY; delete process.env.DEEPSEEK_API_KEY; }); diff --git a/tests/integration/e2e.integration.test.ts b/tests/integration/e2e.integration.test.ts index 58cb08f..6043943 100644 --- a/tests/integration/e2e.integration.test.ts +++ b/tests/integration/e2e.integration.test.ts @@ -39,8 +39,9 @@ describe('MCP Client Integration', () => { TASK_MANAGER_FILE_PATH: testFilePath, NODE_ENV: "test", DEBUG: "mcp:*", // Enable MCP debug logging - // Pass the API key from the test runner's env to the child process env - OPENAI_API_KEY: process.env.OPENAI_API_KEY ?? '' + // Pass API keys from the test runner's env to the child process env + OPENAI_API_KEY: process.env.OPENAI_API_KEY ?? '', + GEMINI_API_KEY: process.env.GEMINI_API_KEY ?? '' } }); @@ -349,4 +350,63 @@ describe('MCP Client Integration', () => { // The temporary file will be cleaned up by the afterAll hook that removes tempDir console.log('Successfully generated project plan with tasks'); }); + + // Skip by default as it requires Google API key + it.skip('should generate a project plan using Google Gemini', async () => { + console.log('Testing project plan generation with Google Gemini...'); + + // Skip if no Google API key is set + const googleApiKey = process.env.GEMINI_API_KEY; + if (!googleApiKey) { + console.log('Skipping test: GEMINI_API_KEY not set'); + return; + } + + // Create a temporary requirements file + const requirementsPath = path.join(tempDir, 'google-requirements.md'); + const requirements = `# Project Plan Requirements (Google Test) + +- This is a test of whether we are correctly attaching files to our prompt for Google models +- Return a JSON project plan with one task +- Task title must be 'GeminiTask' +- Task description must be 'GeminiDescription' +- Project plan attribute should be 'GeminiPlan'`; + + await fs.writeFile(requirementsPath, requirements, 'utf-8'); + + // Test prompt and context + const testPrompt = "Create a step-by-step project plan to develop a cloud-native microservice using Go"; + + // Generate project plan using Google Gemini + const generateResult = await client.callTool({ + name: "generate_project_plan", + arguments: { + prompt: testPrompt, + provider: "google", + model: "gemini-1.5-flash-latest", // Using a generally available model, adjust if needed + attachments: [requirementsPath] + } + }) as ToolResponse; + + expect(generateResult.isError).toBeFalsy(); + const planData = JSON.parse((generateResult.content[0] as { text: string }).text); + + // Verify the generated plan structure + expect(planData).toHaveProperty('data'); + expect(planData.data).toHaveProperty('tasks'); + expect(Array.isArray(planData.data.tasks)).toBe(true); + expect(planData.data.tasks.length).toBeGreaterThan(0); + + // Verify task structure based on requirements file + const firstTask = planData.data.tasks[0]; + expect(firstTask).toHaveProperty('title'); + expect(firstTask).toHaveProperty('description'); + + // Verify that the generated task adheres to the requirements file context + expect(firstTask.title).toBe('GeminiTask'); + expect(firstTask.description).toBe('GeminiDescription'); + + // The temporary file will be cleaned up by the afterAll hook that removes tempDir + console.log('Successfully generated project plan with Google Gemini'); + }); }); \ No newline at end of file