Refactor: Improve MCP logging, update E2E & tests

Refactors MCP server logging and updates testing infrastructure.

- MCP Server:

  - Replaced manual logger wrappers with centralized `createLogWrapper` utility.

  - Updated direct function calls to use `{ session, mcpLog }` context.

  - Removed deprecated `model` parameter from analyze, expand-all, expand-task tools.

  - Adjusted MCP tool import paths and parameter descriptions.

- Documentation:

  - Modified `docs/configuration.md`.

  - Modified `docs/tutorial.md`.

- Testing:

  - E2E Script (`run_e2e.sh`):

    - Removed `set -e`.

    - Added LLM analysis function (`analyze_log_with_llm`) & integration.

    - Adjusted test run directory creation timing.

    - Added debug echo statements.

  - Deleted Unit Tests: Removed `ai-client-factory.test.js`, `ai-client-utils.test.js`, `ai-services.test.js`.

  - Modified Fixtures: Updated `scripts/task-complexity-report.json`.

- Dev Scripts:

  - Modified `scripts/dev.js`.
This commit is contained in:
Eyal Toledano
2025-04-28 14:38:01 -04:00
parent 5f504fafb8
commit 4cf7e8a74a
37 changed files with 687 additions and 1736 deletions

View File

@@ -26,12 +26,6 @@ export function registerAnalyzeTool(server) {
.describe(
'Output file path relative to project root (default: scripts/task-complexity-report.json)'
),
model: z
.string()
.optional()
.describe(
'Deprecated: LLM model override (model is determined by configured role)'
),
threshold: z.coerce
.number()
.min(1)
@@ -44,7 +38,7 @@ export function registerAnalyzeTool(server) {
.string()
.optional()
.describe(
'Path to the tasks file relative to project root (default: tasks/tasks.json)'
'Absolute path to the tasks file in the /tasks folder inside the project root (default: tasks/tasks.json)'
),
research: z
.boolean()