Commit a1d9c1e
feat(core): add Pydantic models for wizard configuration (CLI-5)
Implements CLI-5: Complete Pydantic model structure for wizard system.
Models Added:
Action Types (Discriminated Union):
- BashActionConfig: Bash command execution with env variables
- PythonActionConfig: Python function invocation
- ActionConfigUnion: Type-safe discriminated union
Option Types (Discriminated Union):
- StringOptionConfig: Text input
- SelectOptionConfig: Dropdown/menu selection
- PathOptionConfig: File/directory path input
- NumberOptionConfig: Numeric input with min/max
- BooleanOptionConfig: Yes/no toggle
- OptionConfigUnion: Type-safe discriminated union
Navigation & Structure:
- MenuConfig: Navigation menu items
- BranchConfig: Wizard screen/step with actions, options, menus
- WizardConfig: Complete wizard with entry point and branches
State Management:
- SessionState: Unified state for wizard and parser
- Current branch tracking
- Navigation history
- Option values
- Variables for interpolation
- Parser state (mode, command history)
Result Types:
- ActionResult: Action execution results
- CollectionResult: Option collection results
- NavigationResult: Navigation operation results
Features:
- StrictModel base class with Pydantic v2 strict mode
- Field validation with descriptive error messages
- JSON serialization/deserialization support
- Metadata and tagging infrastructure
- MyPy strict mode compliance
Tests: 159 unit tests covering all models and validation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 04ce4d3 commit a1d9c1e
File tree
2 files changed
+1428
-2
lines changed- src/cli_patterns/core
- tests/unit/core
2 files changed
+1428
-2
lines changed
0 commit comments