Skip to content

feat: add natural-language Telegram search control - #9

Merged
vgvr0 merged 4 commits into
masterfrom
feature/telegram-natural-language-control
Sep 24, 2026
Merged

vgvr0 merged 4 commits into
masterfrom
feature/telegram-natural-language-control

Conversation

@vgvr0

@vgvr0 vgvr0 commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Summary

Adds natural-language control to the Telegram bot using the existing LLM backend strictly as an intent parser.

Main changes

  • Natural-language parsing into TelegramIntent
  • Reuses existing TelegramControlService
  • Commands and pending confirmation/disambiguation bypass the LLM
  • Supports create, list, show, update, enable/disable, run, and delete search flows
  • Safe ambiguity handling and delete confirmation
  • Cross-chat isolation and LLM-disabled fallback
  • Timeout/provider/invalid-output handling
  • Whitelisted intent actions only
  • Prometheus metrics and documentation updates

Safety

The LLM is only an intent parser. It does not access repositories, execute SQL, call domain services directly, bypass ownership checks, or execute arbitrary actions. All execution still goes through TelegramControlService.

Validation

  • SQLite: PASS
  • PostgreSQL: 15 tests PASS
  • Alembic: PASS, single head 0027
  • Full tests: 447 passed, 15 skipped
  • Ruff: PASS
  • Ruff format: PASS
  • mypy: PASS
  • Docker Compose config: PASS

Known limitation

Pending confirmation and disambiguation state is in-memory with a 5-minute TTL and assumes a single bot process. This is intentionally out of scope for this iteration.

@vgvr0
vgvr0 merged commit 669f405 into master Sep 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant