Files
agent-zero/extensions/python/job_loop/AGENTS.md
T
Alessandro 9ae1939bd6 Restore secure Telegram scopes and preserve legacy configuration
Restore global, project, profile, and project/profile configuration with
one bot identity per saved scope. Preserve inherited configuration and
pause conflicting legacy bot identities without discarding their settings.

Revalidate scope, activation, and access rules for inbound messages,
commands, callbacks, session selection, and outbound delivery. Keep scoped
bots within their owning project/profile, omit credentials from persisted
chat metadata, and sanitize attachment filenames.

Automatically back up existing configuration, activation, and session
mappings before upgrade. Preserve their contents and stable global session
keys, while provisioning secure webhook secrets where legacy settings
require them. Document scope ownership, conflict recovery, and migration.

Validation:
- Docker framework suite: 216 passed, plus 73 subtests.
- Live Telegram status and message/reply round-trip confirmed.
- Missing and forged webhook credentials rejected with HTTP 403.
- Existing live configuration, activation, and session mappings unchanged.
2026-11-12 17:27:15 +01:00

836 B

Job Loop Extensions DOX

Purpose

  • Own periodic backend maintenance jobs.

Ownership

  • Ordered Python files own cleanup of expired API chats, cache trimming, and future job-loop tasks.
  • _11_scoped_telegram.py calls Telegram's plugin-owned manager only when global activation is disabled; this preserves scoped activation and stops revoked bot connections even when plugin extension discovery excludes the global hook.

Local Contracts

  • Jobs must be idempotent and safe to run repeatedly.
  • Keep cleanup scoped to owned caches, temporary contexts, or documented runtime state.

Work Guidance

  • Avoid expensive work on every loop; use timestamps or thresholds when practical.

Verification

  • Run targeted cleanup/cache tests or smoke-test job-loop startup after changes.

Child DOX Index

No child DOX files.