-
Notifications
You must be signed in to change notification settings - Fork 0
feat: refactor structural data endpoints to read from SettingsService via JSON settings #502
Copy link
Copy link
Closed
Labels
prio:mediumShould do, but not blockingShould do, but not blockingscope:large3+ days of work3+ days of workscope:medium1-3 days of work1-3 days of workspec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturespec:providersDESIGN_SPEC Section 9 - Model Provider LayerDESIGN_SPEC Section 9 - Model Provider Layertype:featureNew feature implementationNew feature implementation
Description
Summary
Refactor agents, departments, and providers API endpoints to read from SettingsService via JSON-type settings instead of directly from RootConfig. This makes structural org data (agent roster, department hierarchy, provider configs) editable at runtime through the DB/API without YAML edits or restarts.
Context
Issue #497 migrates scalar config consumers (budget limits, coordination topology, autonomy level, etc.) to SettingsService. However, structural data endpoints still read directly from app_state.config:
api/controllers/agents.py→app_state.config.agents(tuple of AgentConfig)api/controllers/departments.py→app_state.config.departments(tuple of Department)api/controllers/providers.py→app_state.config.providers(dict of ProviderConfig)api/controllers/company.py→config.agents,config.departmentsapi/controllers/analytics.py→len(config.agents)
These are complex nested Pydantic models that don't map to individual scalar settings. They need JSON-type SettingDefinition entries in the registry.
Scope
- Add JSON-type settings:
company/agents,company/departments,providers/configs - Enhance
config_bridge.extract_from_config()to serialize Pydantic models and dicts/lists as JSON (currently usesstr()which produces repr, not valid JSON) - Add
ConfigResolvermethods:get_agents(),get_departments(),get_provider_configs()that deserialize JSON back to typed Pydantic models - Migrate the 5 controller files listed above
- Update corresponding tests
Blocked By
- feat: migrate existing config paths to read through SettingsService #497 (creates the
ConfigResolverinfrastructure this builds on)
Related
- feat: implement provider management (multi-auth, runtime CRUD, local providers) #451 (provider runtime CRUD — complementary, that adds write endpoints)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio:mediumShould do, but not blockingShould do, but not blockingscope:large3+ days of work3+ days of workscope:medium1-3 days of work1-3 days of workspec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturespec:providersDESIGN_SPEC Section 9 - Model Provider LayerDESIGN_SPEC Section 9 - Model Provider Layertype:featureNew feature implementationNew feature implementation