fix(cli): codex MCP install throws on Windows

Aperta
#1,308 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
481
Fork
45
Merge medio
1g 13h
PR unite (30g)
91

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ai-driven-dev/framework

Tutte le issue di ai-driven-dev/framework

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.