steward_mirror/config.example.yaml
Daniel Wagner d5eac108f8 feat: implement OmegaConf-based configuration management with uv
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
2026-07-26 12:34:23 +10:00

70 lines
2.2 KiB
YAML

# Example Steward Configuration (config.yaml)
#
# This file demonstrates how to configure Steward using a YAML config file.
#
# To use this config:
# 1. Copy this file to your deployment location (e.g., /etc/steward/config.yaml)
# 2. Set the CONFIG_FILE environment variable: CONFIG_FILE=/etc/steward/config.yaml
# 3. Secrets should still be provided via environment variables (see below)
#
# Configuration Precedence:
# 1. Environment variables (STEWARD__SECTION__KEY=value) - HIGHEST
# 2. CONFIG_FILE YAML file
# 3. Default values - LOWEST
#
# Secret Management:
# - Never put secrets (API keys, tokens) in this YAML file
# - Use environment variables instead:
# * STEWARD__TELEGRAM__BOT_TOKEN
# * STEWARD__OPENAI__API_KEY
# * STEWARD__ANALYSIS__TARGET_API_KEY
# * STEWARD__TOOLS__MCP_SERVER_API_KEY
telegram:
# Bot token is REQUIRED and should be set via STEWARD__TELEGRAM__BOT_TOKEN env var
bot_token: ""
# List of user IDs allowed to interact via DM (empty = all users allowed)
allowed_user_ids:
- 1234567890
- 9876543210
# List of group/channel IDs where bot operates (empty = all groups allowed)
group_ids:
- -1005308306472
openai:
# API key should be set via STEWARD__OPENAI__API_KEY env var
api_key: ""
# Base URL for OpenAI-compatible API
base_url: "https://api.openai.com/v1"
# Model to use
model: "gpt-4o"
# Custom system prompt (optional)
system_prompt: "You are Steward, a persistent, trustworthy AI-assisted personal operations platform. You reduce cognitive load by observing, remembering, planning, and proposing actions. You are conservative, transparent, and policy-aware. Always explain your reasoning."
analysis:
# Optional: URL for API analysis/proposals
target_url: ""
# Optional: API key for analysis target (set via STEWARD__ANALYSIS__TARGET_API_KEY)
target_api_key: ""
# Schedule for automatic analysis (cron-like)
cron_hour: 8
cron_minute: 0
memory:
# Path to persistent thread memory storage
thread_memory_path: "/data/thread_memory.json"
tools:
# Optional: MCP/OpenAPI tool server URL
mcp_server_url: ""
# Optional: API key for MCP server (set via STEWARD__TOOLS__MCP_SERVER_API_KEY)
mcp_server_api_key: ""