fix(cli): codex MCP install throws on Windows

未關閉
#1,308 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
72/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
typescript
領域
cli

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
TypeScript
星號
481
分支
45
平均合併
1 天 13 小時
30 天內合併 PR
91

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

ai-driven-dev/framework 的其他 Issue

查看 ai-driven-dev/framework 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。