Commit graph

6 commits

Author SHA1 Message Date
Till-JS
867a1a7fb6 ♻️ refactor: migrate 5 bots to KeywordCommandDetector
Migrated to KeywordCommandDetector from @manacore/matrix-bot-common:
- matrix-calendar-bot (termine, kalender keywords)
- matrix-clock-bot (timer, zeit keywords)
- matrix-picture-bot (modelle, verlauf keywords)
- matrix-todo-bot (aufgaben, projekte keywords)
- matrix-zitare-bot (zitat, kategorien keywords)

Removed duplicate KEYWORD_COMMANDS arrays and detectKeywordCommand()
methods from all 5 bots.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 03:11:58 +01:00
Till-JS
2567ea622c ♻️ refactor: migrate all 18 Matrix bots to extend BaseMatrixService
All Matrix bots now extend BaseMatrixService from @manacore/matrix-bot-common:
- matrix-calendar-bot
- matrix-chat-bot
- matrix-clock-bot
- matrix-contacts-bot
- matrix-mana-bot
- matrix-manadeck-bot
- matrix-nutriphi-bot
- matrix-ollama-bot
- matrix-picture-bot
- matrix-planta-bot
- matrix-presi-bot
- matrix-project-doc-bot
- matrix-questions-bot
- matrix-skilltree-bot
- matrix-storage-bot
- matrix-todo-bot
- matrix-tts-bot
- matrix-zitare-bot

Consolidated code:
- Matrix client initialization (onModuleInit)
- Graceful shutdown (onModuleDestroy)
- sendMessage/sendReply/sendNotice methods
- markdownToHtml conversion
- Room permission checking
- Media upload/download

Estimated code reduction: ~1,500+ lines of duplicate code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 02:47:11 +01:00
Till-JS
83f2d63f56 ♻️ refactor: migrate 19 Matrix bots to shared HealthController
- All bots now use HealthController from @manacore/matrix-bot-common
- Deleted 19 duplicate health.controller.ts files
- Added IConfigService interface for @nestjs/config v3/v4 compatibility
- matrix-stats-bot migrated to use BaseMatrixService as example
- All 19 bots pass type-check

This consolidation eliminates ~400 lines of duplicate health check code.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 01:17:01 +01:00
Till-JS
9b61831cb5 ♻️ refactor: consolidate SessionService & TranscriptionService in @manacore/bot-services
Created shared services to eliminate code duplication across Matrix bots:

**New Services in @manacore/bot-services:**
- SessionService: User authentication via mana-core-auth (was duplicated in 11 bots)
- TranscriptionService: Speech-to-text via mana-stt (was duplicated in 6 bots)

**Migrated Bots:**
- matrix-todo-bot: uses TranscriptionService
- matrix-picture-bot: uses SessionService
- matrix-clock-bot: uses TranscriptionService
- matrix-zitare-bot: uses both SessionService & TranscriptionService

**Code Reduction:**
- Removed ~300 lines of duplicate code from migrated bots
- Centralized service configuration via NestJS modules
- Added comprehensive documentation in CLAUDE.md

Remaining bots can be migrated following the same pattern documented
in packages/bot-services/CLAUDE.md.

Note: @storage/backend type-check fails due to pre-existing drizzle-orm issue

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:37:54 +01:00
Till-JS
e2a3277fa1 feat(matrix-clock-bot): add Matrix bot for time tracking
- Add Docker build configuration with npm overrides for matrix-sdk
- Update port from 3317 to 3318 to avoid conflict with Zitare bot
- Add tsconfig.build.json for production builds
- Add clock-bot service to docker-compose.macmini.yml
- Bot supports timers, alarms, and world clocks via Matrix chat

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:04:45 +01:00
Till-JS
dbd14f7134 feat(matrix-clock-bot): add Matrix bot for time tracking
Features:
- Timer commands: !timer 25m, !stop, !resume, !reset, !status
- Alarm commands: !alarm 07:30, !alarms
- World clock: !zeit, !weltuhr Berlin, !weltuhren
- Voice note support via mana-stt transcription
- Natural language parsing for German time formats
2026-01-28 16:27:49 +01:00