Skip to content

fix(sync-config-ai): dynamic MCP form, env vars, type/serialization fixes (v1.5.2)#15

Merged
savez merged 12 commits intomainfrom
007-sync-ai-config-tui
Apr 3, 2026
Merged

fix(sync-config-ai): dynamic MCP form, env vars, type/serialization fixes (v1.5.2)#15
savez merged 12 commits intomainfrom
007-sync-ai-config-tui

Conversation

@savez
Copy link
Copy Markdown
Owner

@savez savez commented Apr 2, 2026

Summary

  • Dynamic MCP form: fields adapt to transport type — stdio shows Command/Args, sse/streamable-http shows URL, irrelevant fields hidden
  • Env vars support: new KEY=VALUE editor field for environment variables in MCP creation/editing
  • Fixed args/env serialization: args now written as string[] and env as Record<string,string> — not raw strings
  • Fixed type field: stdio no longer writes type: "stdio" to config files — improves cross-environment compatibility
  • Transport-specific validation: stdio requires Command, sse/http requires URL, env var format validated
  • Legacy data normalization: deployer auto-converts string-format args/env from older store entries

Test plan

  • All 796 tests pass
  • Lint clean (0 errors, 0 warnings)
  • Manual TUI test: create stdio MCP with env vars, verify deployed JSON has proper arrays/objects
  • Manual TUI test: switch transport to sse, verify URL field appears and Command/Args hide
  • Verify existing entries with legacy string data are normalized on deploy

🤖 Generated with Claude Code

savez and others added 12 commits April 1, 2026 10:57
Introduces `dvmi sync-config-ai` — an interactive full-screen TUI for
managing AI coding tool configurations (MCP servers, commands, skills,
agents) across VS Code Copilot, Claude Code, OpenCode, Gemini CLI, and
GitHub Copilot CLI from a single place.

Key capabilities:
- Filesystem scan on every launch detects installed AI tools (project +
  global paths, including ~/.config/opencode/ for globally installed OpenCode)
- 5-tab TUI: Environments (read-only) + dedicated tab per category type
  (MCPs | Commands | Skills | Agents) — each tab shows only its entries
- Inline forms with type-specific fields and a mini text editor for
  multi-line content; Environments multi-select filtered to compatible
  tools per compatibility matrix
- Full CRUD: create, edit, deactivate/activate, delete with confirmation
- Entries persist in ~/.config/dvmi/ai-config.json and are deployed to
  target environment config files on save
- Chezmoi integration: auto-syncs AI config after mutations if configured;
  shows setup tip in footer otherwise
- --json flag for non-interactive/CI use

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Format all source and test files with Prettier (space-free destructuring,
consistent import spacing). Add project-level Claude Code slash commands
under .claude/commands/ for speckit workflow integration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add .claude/ to .gitignore and remove tracked files — project-level
Claude Code commands and memory are local-only artifacts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace stale content (old repo references, incorrect versions) with
the actual release history from v1.0.0 to v1.4.2, plus an [Unreleased]
section documenting the sync-config-ai feature landing in v1.5.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added dotfiles, prompts, vuln, logs, security, sync-config-ai, and welcome
commands that existed in src/ but were not documented in the README.
Also updated the "What It Does" feature table to reflect the full feature set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ies, drift detection

- Add 5 new AI environments: Cursor, Windsurf, Continue.dev, Zed, Amazon Q
- Add Rules category (5th type) with MDC/markdown deployment support
- Add native entry parsing — show unmanaged items in read-only Native section
- Add drift detection with re-deploy/accept-changes resolution UI
- Add env var masking for MCP entries with r to reveal, i to import native
- Wire chezmoi sync after every store mutation
- Bump schema to v2 with migration, expand --json output
- Bump version to 1.5.1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add v1.5.1 changelog entry with new environments, categories, native entries, drift detection
- Update README sync-config-ai section with 10 envs, TUI sections, key bindings, --json flag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
# Conflicts:
#	CHANGELOG.md
#	CLAUDE.md
#	README.md
#	package.json
#	src/commands/sync-config-ai/index.js
#	src/formatters/ai-config.js
#	src/services/ai-config-store.js
#	src/services/ai-env-deployer.js
#	src/services/ai-env-scanner.js
#	src/types.js
#	src/utils/tui/form.js
#	src/utils/tui/tab-tui.js
#	tests/integration/sync-config-ai.test.js
#	tests/services/ai-config-sync.test.js
#	tests/snapshots/__snapshots__/sync-config-ai.test.js.snap
#	tests/snapshots/sync-config-ai.test.js
#	tests/unit/services/ai-config-store.test.js
#	tests/unit/services/ai-env-deployer.test.js
#	tests/unit/services/ai-env-scanner.test.js
…serialization (v1.5.2)

- Dynamic form fields based on transport type (stdio shows Command/Args, sse/http shows URL)
- Env vars editor field (KEY=VALUE per line) for MCP servers
- Transport-specific validation (stdio requires Command, sse/http requires URL)
- Args as multi-line editor (one per line) instead of space-separated text
- Fix params pollution: name/environments/description no longer leak into MCPParams
- Fix type field: omit type for stdio (environments infer from command)
- Fix env/args serialization: always write as object/array, not strings
- Normalize legacy string args/env from older store entries
- Align drift detection with deployer output for stdio type omission

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Coverage Report

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

QA Report

Check Status
🔍 Lint
🧪 Test & Coverage
🔐 Secrets Scan

Generated automatically by QA Workflow

@savez savez merged commit 9ff5cdd into main Apr 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant