Add TOML nested tables format support#3597
Draft
aponcedeleonch wants to merge 2 commits intotoml-array-of-tablesfrom
Draft
Add TOML nested tables format support#3597aponcedeleonch wants to merge 2 commits intotoml-array-of-tablesfrom
aponcedeleonch wants to merge 2 commits intotoml-array-of-tablesfrom
Conversation
Add support for TOML configuration files using the array-of-tables format ([[section]]), which is used by clients like Mistral Vibe. This PR adds: - TOML extension constant and TOMLStorageType type - Shared TOML helper functions (tomlWithFileLock, readTOMLConfig, writeTOMLConfig, extractURLFromMCPServer, convertToAnySlice) - TOMLConfigUpdater struct for array-of-tables format - Helper functions extractServersKeyFromConfig and extractURLLabelFromConfig for extracting configuration values - Changes to validateConfigFileFormat for TOML support - Changes to CreateClientConfig for TOML file creation - Changes to retrieveConfigFileMetadata for TOML updater creation - Comprehensive tests for the array-of-tables format Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add support for TOML configuration files using the nested tables format ([section.servername]), which is used by clients like Codex. This PR adds: - TOMLStorageTypeMap constant for nested tables format - TOMLMapConfigUpdater struct and methods - Conditional logic in retrieveConfigFileMetadata to select updater based on TOMLStorageType - Comprehensive tests for the nested tables format This builds on top of the array-of-tables TOML support added in PR #3596. Co-Authored-By: Claude Opus 4.5 <[email protected]>
51c3d8a to
3fe280b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## toml-array-of-tables #3597 +/- ##
========================================================
+ Coverage 65.51% 65.52% +0.01%
========================================================
Files 406 406
Lines 39996 40193 +197
========================================================
+ Hits 26202 26338 +136
- Misses 11762 11799 +37
- Partials 2032 2056 +24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
[section.servername])Changes
TOMLStorageTypeMapconstant for nested tables formatTOMLMapConfigUpdaterstruct and methods (Upsert, Remove, getServersMap, buildServerEntry)retrieveConfigFileMetadatato select the appropriate updater based onTOMLStorageTypeTOMLMapConfigUpdaterDependencies
This PR depends on #3596 which adds the foundation TOML support with the array-of-tables format.
🤖 Generated with Claude Code