Skip to main content

Configuration management for Kollabor

Project description

kollabor-config

kollabor-config is the configuration and path-management package for Kollabor.

It centralizes config loading, global/project path helpers, plugin config schemas, migrations, task settings, and hot reload. Other packages should use this package instead of hardcoding ~/.kollab paths or parsing config files directly.

Current Role

  • Load and merge Kollabor configuration from files and environment-compatible sources.
  • Manage global and project-scoped data directories.
  • Provide plugin config schemas and widget metadata.
  • Support config migrations and first-run initialization.
  • Provide hot reload callbacks when watchdog is available.
  • Expose task/queue/background-task config models.

Architecture

Module Responsibility
service.py singleton-style config access, save/reload, file watching
loader.py lower-level config loading and merge behavior
manager.py global/project config manager compatibility layer
config_utils.py config directory, logs, conversations, prompt paths
plugin_schema.py plugin field/schema/widget definitions
plugin_config_manager.py plugin config retrieval and persistence
llm_task_config.py LLM task, queue, and background-task settings
migration.py config version migration helpers

Usage

from kollabor_config import ConfigService, get_plugin_config_manager

config = ConfigService.get_instance()
model = config.get("kollabor.llm.model", "claude-3-5-sonnet")

plugin_config = get_plugin_config_manager().get_plugin_config("my_plugin")

Known Gaps

  • Some application code still reaches directly into home-directory paths; those paths should move toward these helpers over time.
  • Config keys are not yet fully described by one typed registry, so stale keys can appear in docs, defaults, or plugin code.
  • Hot reload depends on optional watchdog support and callback consumers; code that needs reloads should handle the no-watchdog path.
  • Root package and workspace package versions can drift during development; the release process should keep them synchronized when publishing packages.

Roadmap

Phase 1: Key registry

  • Create a canonical config key catalog with defaults, types, descriptions, and ownership.
  • Generate config UI schemas and docs from the same catalog where possible.
  • Add tests that catch missing, renamed, or stale config keys.

Phase 2: Path consolidation

  • Replace direct Path.home() / ".kollab" usage in callers with package helpers.
  • Clarify project-scoped versus global data locations.
  • Add path migration tests for existing user config/data layouts.

Phase 3: Reload and migration hardening

  • Make reload callback behavior consistent with and without watchdog.
  • Add migration dry-run/reporting utilities.
  • Improve validation and recovery around corrupted config files.

Development

Targeted validation examples:

python -m py_compile packages/kollabor-config/src/kollabor_config/*.py
python -m pytest tests/unit/commands/test_all_command_handlers.py -q

Dependencies

  • kollabor-events

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kollabor_config-0.5.11.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kollabor_config-0.5.11-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

Details for the file kollabor_config-0.5.11.tar.gz.

File metadata

  • Download URL: kollabor_config-0.5.11.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for kollabor_config-0.5.11.tar.gz
Algorithm Hash digest
SHA256 5738f8d8a35e8c40a6c27a6f1c69e124bdc0efc75b43aa3ad6e3d490372455d5
MD5 a18821289294148e7e7f02bae6e346e9
BLAKE2b-256 6d61ea2461c95c624b12a4e3bdc23de7e98f76f8c99e86d6ab382df4234e2ae3

See more details on using hashes here.

File details

Details for the file kollabor_config-0.5.11-py3-none-any.whl.

File metadata

File hashes

Hashes for kollabor_config-0.5.11-py3-none-any.whl
Algorithm Hash digest
SHA256 8ea280a6df7e680995c66c81e210bbca5c45b0acd0be46f83164f95918e003cd
MD5 6acdefaa5aceb67918d3f02a8ffd076f
BLAKE2b-256 a450b0606c82618c00b8ba19823676d64afdb6d67ccabadb03c2f4ab8cd518f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page