Implement dynamic version loading system

- Convert all hardcoded versions to dynamic loading from VERSION file
- Reduce version update locations from 50+ to just 3 files
- Add proper fallback handling for version reading
- Update all CLI commands to use dynamic __version__
- Streamline future version management process

This change makes version bumping much simpler - only need to update:
1. VERSION file
2. package.json
3. pyproject.toml
This commit is contained in:
NomenAK
2025-08-23 14:10:11 +02:00
parent 4831319a10
commit 9abaa10366
15 changed files with 57 additions and 30 deletions

View File

@@ -6,6 +6,7 @@ from typing import Dict, List, Tuple, Optional, Any
from pathlib import Path
from ..core.base import Component
from setup import __version__
class AgentsComponent(Component):
@@ -19,7 +20,7 @@ class AgentsComponent(Component):
"""Get component metadata"""
return {
"name": "agents",
"version": "4.0.7",
"version": __version__,
"description": "14 specialized AI agents with domain expertise and intelligent routing",
"category": "agents"
}
@@ -29,7 +30,7 @@ class AgentsComponent(Component):
return {
"components": {
"agents": {
"version": "4.0.7",
"version": __version__,
"installed": True,
"agents_count": len(self.component_files),
"install_directory": str(self.install_component_subdir)
@@ -63,7 +64,7 @@ class AgentsComponent(Component):
# Add component registration
self.settings_manager.add_component_registration("agents", {
"version": "4.0.7",
"version": __version__,
"category": "agents",
"agents_count": len(self.component_files),
"agents_list": self.component_files