57 Commits

Author SHA1 Message Date
0667adbf72
Revert "docs: document pr_reviewer manual-trigger workflow in AGENTS.md"
This reverts commit e2ba3dd0990d31167f48bfd0f33f273f0e426514.
2026-08-18 22:08:16 +10:00
e2ba3dd099
docs: document pr_reviewer manual-trigger workflow in AGENTS.md
The pr_reviewer webhook only fires on PR open and does not re-trigger on
branch updates or recall. Document the manual API trigger and the loop of
posting the review + response to the PR as comments, so future sessions
can iterate on reviews.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-18 22:03:39 +10:00
f79214bb22
fix: address pr_reviewer findings (data loss, memory, prompt injection)
- 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>
2026-08-18 22:01:59 +10:00
9c36b373d2
fix: harden k8s security context and use SHA-tagged images
Address pr_reviewer findings:
- Enforce non-root (UID/GID 1000), no privilege escalation, drop all caps
  in the deployment securityContext.
- Tag images with the git SHA in addition to latest, and pin the deployed
  image to the SHA for idempotent rollbacks.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-18 21:53:11 +10:00
0a7273b321
docs: document Gitea Actions pipeline variables in README
Add the full table of secrets and variables the build/deploy workflow reads
from the gitea repo, including the Matrix and Ollama Cloud options.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-18 21:51:12 +10:00
4838b9c388
ci: wire Matrix appservice env vars into the steward-env secret
Add STEWARD__MATRIX__* literals to the deployment secret so the Matrix
appservice bot is configured when the cluster secret is created. Values
come from gitea repo vars/secrets (MATRIX_HOMESERVER_URL, MATRIX_AS_TOKEN,
etc.) and are only populated when those are set.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-18 21:44:28 +10:00
c8f3600b32
docs: document Matrix appservice integration and gitea deployment
- Add Matrix bot to the feature list and prerequisites.
- Add a Matrix Appservice section covering config, Synapse registration,
  and the shared conversation pipeline.
- Document the matrix config section in CONFIGURATION.md.
- Add a ready-to-use Synapse appservice registration template
  (matrix/steward_appservice.yaml).
- Document the Gitea Actions build/deploy workflow and kube manifests.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-18 21:40:58 +10:00
76777c98eb
feat: add Matrix appservice bot and platform-agnostic conversation core
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>
2026-08-18 21:38:01 +10:00
260720dd10
chore: add Kubernetes deployment manifests and Gitea Actions build workflow
Mirror the pr_reviewer deployment pattern: Gitea Actions builds a multi-arch
image in the gitea-runner namespace, pushes to git.aridgwayweb.com, recreates
the steward namespace with regcred + env secret, and applies kube manifests.
Add .omo/ to .gitignore.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-18 21:37:53 +10:00
github-actions[bot]
3c57ea64c1
chore(main): release 0.4.2 (#28)
Some checks failed
Release / release-please (push) Failing after 2m29s
Release / publish (push) Has been skipped
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-27 09:26:31 +10:00
Daniel
cf65198825
fix: accept CSV telegram ID config (#27)
Co-authored-by: openhands <openhands@all-hands.dev>
2026-07-27 09:21:52 +10:00
Daniel
20928f4ab6
chore(deps): update googleapis/release-please-action action to v5 (#26)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2026-07-27 09:11:10 +10:00
Daniel
ffbeef5207
chore(deps): update docker/setup-qemu-action action to v4 (#25)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2026-07-27 08:11:21 +10:00
Daniel
57c9f7554f
chore(deps): update docker/setup-buildx-action action to v4 (#24)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2026-07-27 07:11:11 +10:00
Daniel
09e1d5d4b0
chore(deps): update docker/metadata-action action to v6 (#23)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2026-07-27 06:11:43 +10:00
Daniel
2cd5930e2b
chore(deps): update docker/login-action action to v4 (#22)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2026-07-27 05:11:43 +10:00
Daniel
9fc9cfb7d3
chore(deps): update docker/build-push-action action to v7 (#21)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2026-07-27 04:11:19 +10:00
Daniel
60e36fc6b0
chore(deps): update actions/setup-python action to v7 (#20)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2026-07-27 03:11:06 +10:00
Daniel
2bd7ae3095
chore(deps): update actions/checkout action to v7 (#19)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2026-07-27 02:11:35 +10:00
Daniel
7b18d5008e
chore(deps): update all non-major updates (#18)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2026-07-27 01:11:20 +10:00
github-actions[bot]
f80e1aa8c0
chore(main): release 0.4.1 (#17) 2026-07-26 23:42:15 +10:00
Daniel
5b743fc156
fix: publish multi-arch container images (#16) 2026-07-26 23:40:45 +10:00
github-actions[bot]
31c0806724
chore(main): release 0.4.0 (#15)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-26 21:43:11 +10:00
Daniel
293591e48a
feat: improve Telegram conversation heuristics (#14)
Co-authored-by: openhands <openhands@all-hands.dev>
2026-07-26 21:39:59 +10:00
github-actions[bot]
62e4b5e7fb
chore(main): release 0.3.0 (#12) 2026-07-26 14:12:26 +10:00
Daniel
4099d4aa82
feat: add MCP tool integration via MCPO (#11) 2026-07-26 14:11:07 +10:00
Daniel Wagner
2ceba471d0 chore: bump version to 0.2.0 (group/channel support + OmegaConf) 2026-07-26 13:08:22 +10:00
Daniel Wagner
c646057af3 chore: remove release-please manifest to force regeneration 2026-07-26 13:07:10 +10:00
Daniel Wagner
204a640289 chore: add .mailmap for author consolidation
Map all author variations to Daniel Wagner <dw@danieljw.net>:
- daniel <daniel@hp.k8sx.com>
- Daniel <dw@danieljw.net>
- Daniel Wagner <daniel.wagner89@gmail.com>

This ensures consistent author attribution across all commits.
The mailmap is used by GitHub and git tools for display.
2026-07-26 12:59:20 +10:00
Daniel Wagner
23bd31b233 docs: add comprehensive setup and testing guide for agents
- Add Initial Setup section with uv installation and venv creation steps
- Include pre-commit hook setup with clear explanation of automation
- Update Code Style section to mention pre-commit auto-fixing
- Update Running Tests Locally with venv activation and linting commands
- Add note clarifying pre-commit integration in CI/CD workflow

This ensures new developers/agents know how to:
1. Install dependencies properly with uv
2. Set up pre-commit for automatic linting and testing
3. Run tests and linting commands manually when needed
2026-07-26 12:56:11 +10:00
Daniel Wagner
15b595456a fix: modernize pydantic config to remove deprecation warning
- 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.
2026-07-26 12:54:54 +10:00
Daniel Wagner
4cf28ef582 chore: update pre-commit to use ruff with auto-fix
- Add astral-sh/ruff-pre-commit as official ruff hook
- Enable ruff with --fix for automatic linting fixes
- Add ruff-format for code formatting
- Keep pytest hook for test running

Now pre-commit will automatically fix linting issues and run tests before commits.
2026-07-26 12:52:28 +10:00
Daniel Wagner
2454d3a956 fix: break long lines in conftest.py to comply with ruff E501
Lines 53-54 in tests/conftest.py exceeded 100 character limit.
Split the system prompt string across multiple lines to fix linting error.
2026-07-26 12:52:16 +10:00
Daniel Wagner
8eb1fd6a8e chore: add pre-commit hooks and expand README
- Add .pre-commit-config.yaml with hooks for ruff check and pytest
- Expand README with quick start guide and development instructions
- Include pre-commit setup instructions
- Add references to AGENTS.md and CONFIGURATION.md

To use pre-commit:
  pip install pre-commit
  pre-commit install

Hooks run automatically on commit (ruff check + pytest).
2026-07-26 12:49:22 +10:00
Daniel Wagner
070e967833 test: update test suite for OmegaConf config system
- Add tests/conftest.py with make_settings() helper that maps legacy config
  parameter names to new nested OmegaConf structure
- Update all test files to use the conftest fixture
- All 73 tests now pass with new config system
- Maintains backward compatibility via Settings class properties

Also add AGENTS.md with comprehensive AI agent guidelines:
- Project overview and key technologies
- Directory structure reference
- Development workflow and common tasks
- Testing strategy and patterns
- CI/CD pipeline overview
- Common pitfalls and best practices
- Debugging guide for agents working on the project
2026-07-26 12:48:40 +10:00
Daniel Wagner
d0ccc96507 docs: simplify .env.example to show only required settings
Only include the 4 required environment variables:
- STEWARD__TELEGRAM__BOT_TOKEN
- STEWARD__OPENAI__API_KEY
- STEWARD__TELEGRAM__ALLOWED_USER_IDS
- STEWARD__TELEGRAM__GROUP_IDS

All other settings have sensible defaults in config_schema.yaml and can be
overridden if needed. This keeps the example file clean and focused.
2026-07-26 12:39:11 +10:00
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
Daniel Wagner
669b57a317 feat: add group/channel support for Telegram bot
- 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.
2026-07-26 12:26:57 +10:00
Daniel Wagner
a3ca696546 Merge pull request #6 from djw4/release-please--branches--main 2026-07-26 00:42:42 +10:00
github-actions[bot]
588da5725a chore(main): release 0.1.1 2026-07-25 14:40:35 +00:00
Daniel Wagner
c76969fe8b Merge pull request #5 from djw4/copilot/fix-runtime-error-starting-app 2026-07-26 00:40:20 +10:00
copilot-swe-agent[bot]
47bae80f47 fix: use PTB JobQueue instead of AsyncIOScheduler to fix startup RuntimeError 2026-07-25 14:31:51 +00:00
Daniel Wagner
744396919e Merge pull request #2 from djw4/release-please--branches--main 2026-07-25 23:22:07 +10:00
Daniel Wagner
3b2f8e6199 Merge pull request #3 from djw4/renovate/configure 2026-07-25 23:21:30 +10:00
copilot-swe-agent[bot]
ebcce9c5dc chore: update renovate config with automerge PR and batching for non-major updates 2026-07-25 13:17:34 +00:00
Renovate Bot
6dbfd9a332 Add renovate.json 2026-07-25 13:11:32 +00:00
github-actions[bot]
4466bbf3bb chore(main): release 0.1.0 2026-07-25 13:11:05 +00:00
Daniel Wagner
50d482d697 Merge pull request #1 from djw4/copilot/steward-concept-research 2026-07-25 23:05:05 +10:00
copilot-swe-agent[bot]
51188fe3bd refactor: address code review feedback on MCP tool calling 2026-07-25 12:52:42 +00:00
copilot-swe-agent[bot]
76c6086db3 feat: MCP/OpenAPI tool calling support 2026-07-25 12:50:39 +00:00