- CI/CD: stop deleting the steward namespace on every deploy; use
kubectl apply (dry-run -> apply) so the PVC and conversation memory
survive deployments.
- core: bound _histories with an LRU eviction (max 1000 active threads)
to prevent unbounded memory growth.
- core: wrap knowledge-base context in KB START/END delimiters and
instruct the LLM to treat it as data, mitigating indirect prompt
injection.
- matrix: wrap message processing in try/except so failures are logged
instead of silently dropped.
- telegram: remove now-dead flush/tags prompt constants (centralized in
core).
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Introduce a shared ConversationService (steward/bot/core.py) that owns the
LLM call, history, knowledge-base search, and thread-memory keying behind a
normalized ThreadKey, so both Telegram and Matrix drive the same pipeline.
- Add steward/bot/matrix.py: a mautrix-python appservice bot that receives
Synapse transactions and replies via the client-server API.
- Refactor telegram.py handlers into thin wrappers over ConversationService.
- Generalize ThreadMemoryStore/ThreadSummary to platform-scoped keys with
legacy chat_id:thread_id migration.
- Add a matrix config section (homeserver, tokens, room/user allowlists).
- Rewrite main.py as async, starting Telegram and/or Matrix on one event loop.
- Add mautrix>=0.21.0 dependency.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Replace deprecated class Config pattern with model_config = ConfigDict(...)
- Add ConfigDict import from pydantic
- Fixes PydanticDeprecatedSince20 warning in test output
- Maintains all existing functionality
All 73 tests pass without warnings.
Configuration changes:
- Replace pydantic-settings with OmegaConf for flexible config management
- Support YAML config files via CONFIG_FILE environment variable
- Support environment variables with STEWARD__SECTION__KEY format
- Add config_schema.yaml as default configuration schema
- Create pydantic models for each configuration section for type safety
- Maintain backward compatibility via properties on Settings class
- Add CONFIGURATION.md with comprehensive setup and usage guide
- Update pyproject.toml to include config_schema.yaml in package data
Build/deployment changes:
- Replace pip with uv in Dockerfile for faster dependency installation
- Create docker-compose.dev.yml for local development (build .)
- Keep docker-compose.yml for production (uses ghcr.io/djw4/steward:latest)
- Update .env.example with new STEWARD__* variable format
This setup is designed for Kubernetes deployment:
- Non-sensitive config goes in ConfigMap (config.yaml)
- Secrets go in Secret resources (environment variables)
- Single unified configuration system for all environments
- Add TELEGRAM_GROUP_IDS configuration setting to enable optional group/channel filtering
- Add _is_group_enabled() authorization check to all command handlers
- Add group/channel authorization check to message_handler
- All handlers now verify both user authorization and group authorization
- If TELEGRAM_GROUP_IDS is not configured, bot accepts messages from any group
- If TELEGRAM_GROUP_IDS is configured, bot only processes messages from those groups
This enables the bot to be used in group chats and channels with Topics/Threads support.