refactor: move drivers directory into mcontainer package

- Relocate goose driver to mcontainer/drivers/
- Update ConfigManager to dynamically scan for driver YAML files
- Add support for mc-driver.yaml instead of mai-driver.yaml
- Update Driver model to support init commands and other YAML fields
- Auto-discover drivers at runtime instead of hardcoding them
- Update documentation to reflect new directory structure
This commit is contained in:
2025-03-11 19:37:11 -06:00
parent 6f08e2b274
commit 307eee4fce
10 changed files with 92 additions and 102 deletions

View File

@@ -25,15 +25,26 @@ class PersistentConfig(BaseModel):
description: str = ""
class VolumeMount(BaseModel):
mountPath: str
description: str = ""
class DriverInit(BaseModel):
pre_command: Optional[str] = None
command: str
class Driver(BaseModel):
name: str
description: str
version: str
maintainer: str
image: str
init: Optional[DriverInit] = None
environment: List[DriverEnvironmentVariable] = []
ports: List[int] = []
volumes: List[Dict[str, str]] = []
volumes: List[VolumeMount] = []
persistent_configs: List[PersistentConfig] = []