feat: add multi-agent MCP registration, setup dialog, and uninstall#24
Merged
feat: add multi-agent MCP registration, setup dialog, and uninstall#24
Conversation
AgentConfigManager: - Detects Claude Code and Gemini CLI via config file existence + binary search in common paths (handles macOS GUI PATH limitation) - Registers/unregisters MCP server config with defensive JSON read-merge-write using atomic file operations (temp + rename) - Always uses absolute binary path in config entries to avoid PATH dependency - Handles invalid JSON (backup .bak + create new), missing directories (mkpath), stale paths (update), and idempotent re-registration - configRoot parameter enables testing against temp directories CLI commands: - traktor mcp register — register with all detected agents - traktor mcp unregister — remove from all agents - traktor mcp status — show detection + registration table - traktor mcp status --json — machine-readable output - traktor uninstall — remove CLI symlink, MCP configs, QSettings First-run setup dialog: - Shown on first GUI launch (QSettings flag) - Detects installed agents, shows pre-checked checkboxes - "Set Up" registers selected agents, "Skip" defers - Re-accessible via Tools > Manage AI Agent Integrations... GUI menu items: - Tools > Manage AI Agent Integrations... - Tools > Uninstall Traktor... (with confirmation dialog) Replaces inline registerMcpConfig() in installcli.cpp with AgentConfigManager calls (DRY, supports multiple agents). New files: src/agentconfig.h/cpp, src/setupdialog.h/cpp 10 new tests (97 total, all passing)
…r MSVC compatibility
Windows test binary crashes immediately (exit code 7, no output) when Qt platform plugins are unavailable in CI. Linux already had this env var. Adding it to Windows ensures consistent headless test execution.
QTemporaryFile appears to cause a CRT initialization crash (exit code 7) on Windows MSVC with Qt 5.15.2. Replace with direct QFile writes which is what the original installcli.cpp used successfully. The atomic write improvement (temp + rename) is not worth a platform-specific crash.
Contributor
Build Artifacts
Built from 9a5c3f4. Artifacts expire after 90 days. |
QTemporaryFile causes a CRT initialization crash (exit code 7) on Windows MSVC with Qt 5.15.2 due to internal file locking behavior during static initialization. QSaveFile is Qt's recommended class for atomic config file writes: - Writes to a platform-appropriate temp file internally - Atomically renames to the destination on commit() - Handles Windows rename semantics (no rename-over-existing) - Available since Qt 5.1, no additional dependencies Reference: https://forum.qt.io/topic/130970 (QTemporaryFile + MSVC issue)
- Add scripts/macos-pkg/postinstall that creates /usr/local/bin/traktor symlink during installation (runs as root, no auth dialog needed) - CI now builds a PKG installer alongside the .app tar for PR testing - PKG installs Traktor.app to /Applications and creates CLI symlink - Ad-hoc signed (no Developer ID cert yet) — works for local testing
After uploading release assets, the release workflow now: 1. Computes SHA256 of the macOS DMG 2. Clones servmask/homebrew-traktor 3. Updates Casks/traktor.rb with new version + SHA256 4. Commits and pushes Requires HOMEBREW_TAP_TOKEN secret with repo write access to servmask/homebrew-traktor, or falls back to the default GITHUB_TOKEN (works if both repos are in the same org).
- distribution.xml sets product title to "Traktor" (fixes empty "" in trash dialog and generic "Welcome to the Installer" header) - welcome.html: describes what Traktor does and what the installer will set up (app + CLI tool) - conclusion.html: shows next steps after installation (open app, CLI usage examples, MCP registration command) - Both support dark mode via prefers-color-scheme media query - Uses productbuild --distribution instead of --package for custom UI
…lling to /Applications
--root with cp -R was not preserving the .app bundle structure in the PKG payload. --component is the correct pkgbuild flag for bundling macOS .app directories and sets the install location properly.
The distribution.xml pkg-ref must use #filename.pkg (with # prefix) to embed the component package inside the product archive. Without it, productbuild creates an external reference and the payload is empty. Also adds debug output to verify app bundle and package sizes.
…tions pkgbuild --component adds a <relocate> directive by default, causing macOS Installer to search for an existing Traktor.app bundle anywhere on the system and install there instead of /Applications. If the user has a build directory with Traktor.app, the installer silently overwrites it instead of installing to /Applications. Fix: use --component-plist with BundleIsRelocatable=false to force installation to the specified --install-location.
…nent plist Heredoc with XML content inside YAML run block causes GitHub Actions parser to fail. Use pkgbuild --analyze to auto-generate the component plist, then PlistBuddy to set BundleIsRelocatable=false.
…sn't support plist)
- Remove DMG from release pipeline (PKG is the sole macOS distribution) - release.yml: builds PKG, uploads PKG, submits PKG to VirusTotal, auto-updates Homebrew Cask from PKG SHA256 - README: add CLI usage, MCP integration, Homebrew install, PKG as primary macOS download. Remove DMG references. - CLAUDE.md: update test count (97), document new source files (clihandler, mcpserver, agentconfig, installcli, setupdialog), PKG scripts, and updated CI/release process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
traktor mcp register,traktor mcp unregister,traktor mcp status,traktor uninstallregisterMcpConfig()with multi-agentAgentConfigManagerKey Design Decisions
~/.claude.jsonand~/.gemini/before searching for binaries, solving the macOS GUI PATH limitation (Finder-launched apps don't inherit shell PATH)"traktor", avoiding PATH dependencyAgentConfigManager(configRoot)parameter allows testing against temp directoriesTest plan
traktor mcp statusshows correct detectiontraktor mcp registerwrites valid JSON configs