Skip to content

Conversation

@peteski22
Copy link
Contributor

@peteski22 peteski22 commented Jul 31, 2025

This change provides more granular control over argument validation by separating value-based arguments (e.g., --config=value) from boolean flags (e.g., --verbose).

BREAKING CHANGE: The TOML configuration structure has changed.

  • required_args is now split into required_args (value args) and required_args_bool (boolean flags)
  • Existing .mcpd.toml files using required_args may need to be updated if they contain boolean flag args in their list

Changes:

  • Split ServerEntry.RequiredArgsintoRequiredValueArgsandRequiredBoolArgs`
  • Add VariableTypeArgBool constant for boolean argument classification
  • Add ValueArgument and BoolArgument predicate functions
  • Update cmd/add.go to use new argument filtering logic
  • Add comprehensive test coverage for new argument types
  • Add validation methods for both argument types in runtime.Server
  • Update daemon validation to use new Server.Validate() method
  • Update printer to display both argument types appropriately
  • Enhance registry to properly detect boolean vs value arguments

This change provides more granular control over argument validation by
separating value-based arguments (e.g., --config=value) from boolean
flags (e.g., --verbose).

BREAKING CHANGE: The TOML configuration structure has changed.
- `required_args` is now split into `required_args` (value args) and `required_args_bool` (boolean flags)
- Existing .mcpd.toml files using `required_args` will need to be updated

Changes:
- Split ServerEntry.RequiredArgs into RequiredValueArgs and RequiredBoolArgs
- Add VariableTypeArgBool constant for boolean argument classification
- Add ValueArgument and BoolArgument predicate functions
- Update cmd/add.go to use new argument filtering logic
- Add comprehensive test coverage for new argument types
- Add validation methods for both argument types in runtime.Server
- Update daemon validation to use new Server.Validate() method
- Update printer to display both argument types appropriately
- Enhance registry to properly detect boolean vs value arguments
@peteski22 peteski22 requested a review from agpituk July 31, 2025 19:03
@peteski22 peteski22 merged commit 7772a10 into main Jul 31, 2025
2 checks passed
@peteski22 peteski22 deleted the peteski22/update-arguments-and-export branch July 31, 2025 19:06
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.

2 participants