Skip to content

envsbot v2.2.0

Choose a tag to compare

@cremesk cremesk released this 20 Sep 15:06
· 58 commits to main since this release
v2.2.0
c13d495

envsbot v2.2.0 improves translation reliability and provider choice, tightens IdleRPG fair-play behavior, and fixes filtered doctor diagnostics.

Highlights

  • Added multi-provider translation support for LibreTranslate, Google Cloud Translation, and DeepL.
  • LibreTranslate works out of the box through the default envs.net instance at https://translate.envs.net/.
  • Added optional API-key support for:
    • LibreTranslate
    • Google Cloud Translation Basic v2
    • DeepL API
  • Authenticated providers are preferred in the order:
    LibreTranslate → Google → DeepL.
  • Google now uses only the official Cloud Translation Basic v2 API and therefore requires TRANSLATE_GOOGLE_API_KEY.
  • The previous unauthenticated Google translation endpoint is no longer used.
  • Translation requests automatically fall back to the next configured provider when a provider is unavailable, busy, rate-limited, or rejects the requested language pair.
  • Rate-limit state, cooldowns, and request serialization are tracked independently per provider.
  • ,doctor reports the active translation provider chain and rate-limit state without exposing API keys.
  • Translation provider configuration supports live reload through ,config reload.
  • Removed the IdleRPG push and setlevel progress-override commands.
  • IdleRPG quest participant lists now show whether each participant is online or offline.
  • Fixed ,doctor failed / warning filtering so healthy lines such as 0 failed are not reported as failures and duplicate findings are removed.

Translation providers

Without API keys, envsbot uses the configured LibreTranslate instance:

TRANSLATE_LIBRETRANSLATE_URL = "https://translate.envs.net/"

Google translation is enabled only when a Google Cloud API key is configured. DeepL also requires an API key.

New optional settings:

TRANSLATE_LIBRETRANSLATE_URL = "https://translate.envs.net/"
TRANSLATE_LIBRETRANSLATE_API_KEY = None
TRANSLATE_GOOGLE_API_KEY = None
TRANSLATE_DEEPL_API_KEY = None

TRANSLATE_PROVIDER_QUEUE_TIMEOUT_SECONDS = 5
TRANSLATE_RATE_LIMIT_INITIAL_SECONDS = 60
TRANSLATE_RATE_LIMIT_BACKOFF_MULTIPLIER = 2.0
TRANSLATE_RATE_LIMIT_MAX_SECONDS = 900

Existing TRANSLATE_FROM, TRANSLATE_TO, timeout, and input/output limits remain supported.

Google API-key mode uses the official Cloud Translation Basic v2 API. DeepL Free keys ending in :fx automatically use the DeepL Free API endpoint; other DeepL keys use the standard API endpoint.

Provider fallback and diagnostics

Each configured provider has its own:

  • request serialization lock
  • bounded queue wait
  • HTTP 429 cooldown
  • exponential rate-limit backoff
  • diagnostic state

A failure or cooldown on one provider therefore does not suppress another configured provider.

Provider-specific unsupported language pairs are also handled separately. If one provider rejects a source/target pair, envsbot continues with the next configured provider when available. If no provider can currently handle the pair, the command reports that explicitly instead of presenting it as a general provider outage.

API keys are marked as sensitive configuration values and are not shown in operator-facing diagnostics.

Existing translation behavior

The existing ,tr / ,translate command forms remain available, including explicit source/target languages, automatic source detection, configured target defaults, and reply-based translation through the persistent message cache.

Examples:

,tr en de Hello world
,tr auto pl Guten Morgen
,tr de Hello world

Reply-based translation continues to work in rooms, MUC private messages, and direct chats.

IdleRPG fair-play changes

The administrative progress override commands:

,idlerpg push ...
,idlerpg setlevel ...

have been removed from the command implementation, help metadata, generated documentation, and bundled IdleRPG website documentation.

This keeps normal character progression tied to the game rules rather than manual level/timer manipulation.

The IdleRPG quest view now also shows an online/offline status for each active quest participant. The bundled contrib/idlerpg-site view resolves that status from the normal player export and shows unknown only when a quest participant cannot be matched safely.

Doctor fixes

The filtered doctor views now use structured status prefixes instead of matching free-form words such as failed or warning.

This prevents healthy diagnostics such as:

✅ Background tasks: ... 0 failed

from appearing in ,doctor failed. Identical findings are also deduplicated.

Compatibility

  • Python >= 3.12
  • Requires envs-xmpp >= 1.3.0, < 2.0
  • No database migration is required.
  • Existing translation language/default settings remain compatible.
  • No API key is required for the default LibreTranslate setup.
  • Google translation now requires TRANSLATE_GOOGLE_API_KEY.

When provider fallback is used, the same text may be sent to more than one configured translation service if an earlier provider fails or rejects the requested language pair.

Full changelog

v2.1.1...v2.2.0