fix(cli): codex MCP install throws on Windows

Đang mở
#1,308 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
cli

Hướng nghiên cứu

Start with the named install-config use case and MCP launch transform, then inspect the existing Windows launch tests and add the Codex case described in the issue. Reproduce with a Codex profile, Windows platform, and an MCP source containing an npx server. Done means installation does not throw and the written TOML contains the Windows launch using cmd with /c and npx.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

Installing MCP servers for Codex on Windows throws. The Windows launch rewrite parses its input as JSON, but Codex's MCP content has already been converted to TOML by the tool transform.

Affected file(s)
  • next: cli/src/contexts/framework/application/install/install-config-use-case.ts (applyTransforms: capability.transform(rawContent) then win32Transform(toolContent)), cli/src/contexts/tools/domain/mcp-launch-command.ts (transformMcpForWin32 runs JSON.parse(content)), cli/src/contexts/tools/domain/capabilities/mcp-capability.ts (transform returns mcpJsonToToml for format: "toml"), cli/src/contexts/tools/domain/profiles/codex/profile.ts. Reached from cli/src/contexts/framework/application/restore/generate-tool-distribution-use-case.ts.
  • refactor/cli-target: cli/src/contexts/installation/application/install/install-config.ts (applyTransforms), cli/src/contexts/tools/domain/sections/mcp-section.ts (transformMcpForWin32, launchTransformFor), cli/src/contexts/installation/application/restore/generate-tool-distribution.ts.
Expected behaviour

On Windows, a Codex install with MCP servers succeeds and npx, uvx and uv launches are rewritten for Windows (or knowingly left alone for TOML).

Observed behaviour

JSON.parse throws on the TOML text: Unexpected token 'm', "[mcp_server"... is not valid JSON. The existing Windows cases only cover JSON-format tools, no Codex case exists.

AI tool

Codex

aidd-cli version

unreleased, next

OS

Windows

Additional context

Red-first test: install-config with the Codex profile, a win32Platform and an MCP source containing an npx server. It must not throw, and the written TOML must carry the Windows launch (cmd with /c, npx) for the server. Fix direction: apply the launch rewrite before the format conversion, or have it handle TOML. Decide which, then pin it with the case.

Ngôn ngữ chính
TypeScript
Star
481
Fork
45
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
91

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ai-driven-dev/framework

Tất cả issue của ai-driven-dev/framework

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.